Class: AwardEmojisFinder
- Inherits:
-
Object
- Object
- AwardEmojisFinder
- Defined in:
- app/finders/award_emojis_finder.rb
Instance Attribute Summary collapse
-
#awardable ⇒ Object
readonly
Returns the value of attribute awardable.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(awardable, params = {}) ⇒ AwardEmojisFinder
constructor
A new instance of AwardEmojisFinder.
Constructor Details
#initialize(awardable, params = {}) ⇒ AwardEmojisFinder
Returns a new instance of AwardEmojisFinder.
6 7 8 9 10 11 |
# File 'app/finders/award_emojis_finder.rb', line 6 def initialize(awardable, params = {}) @awardable = awardable @params = params validate_params end |
Instance Attribute Details
#awardable ⇒ Object (readonly)
Returns the value of attribute awardable.
4 5 6 |
# File 'app/finders/award_emojis_finder.rb', line 4 def awardable @awardable end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'app/finders/award_emojis_finder.rb', line 4 def params @params end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 |
# File 'app/finders/award_emojis_finder.rb', line 13 def execute awards = awardable.award_emoji awards = by_name(awards) by_awarded_by(awards) end |