Module: Emotions::Emotive::ClassMethods
- Defined in:
- lib/emotions/emotive.rb
Instance Method Summary collapse
Instance Method Details
#define_emotion_methods(emotion) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/emotions/emotive.rb', line 24 def define_emotion_methods(emotion) class_eval " def \#{emotion}_about\n emotions.where(emotion: \#{emotion.to_s.inspect})\n end\n alias \#{emotion}_with \#{emotion}_about\n alias \#{emotion}_over \#{emotion}_about\n RUBY\nend\n", __FILE__, __LINE__ + 1 |