* Initial automatic cleanup with rubocop * Fix syntax error introduced by rubocop * Cleanup seeds file * Cleanup lib folder * Exclude bin folder because it contains auto generated files * Make Rubocop a little bit more chatty * Block length should not include comments in the count * Cleanup config folder * Cleanup specs * Updated Rubocop version and generated a todo file * Fix broken ArticlesApi spec * Fix tests * Restored rubocop pre-commit hook
18 lines
424 B
Ruby
18 lines
424 B
Ruby
class ReactionImage
|
|
attr_accessor :category
|
|
|
|
def initialize(category)
|
|
@category = category
|
|
end
|
|
|
|
def path
|
|
images = {
|
|
"like" => "emoji/emoji-one-heart.png",
|
|
"unicorn" => "emoji/emoji-one-unicorn.png",
|
|
"hands" => "emoji/emoji-one-hands.png",
|
|
"thinking" => "emoji/emoji-one-thinking.png",
|
|
"readinglist" => "emoji/emoji-one-bookmark.png",
|
|
}.freeze
|
|
images[category]
|
|
end
|
|
end
|