docbrown/app/labor/reaction_image.rb
rhymes e588fa7ece Code cleanups (#659)
* 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
2018-08-07 11:00:13 -04:00

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