Class: Rating
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Rating
- Defined in:
- lib/rating_for/rating.rb
Instance Method Summary collapse
- #is_for ⇒ Object
- #is_for?(element) ⇒ Boolean
- #rated_element ⇒ Object
- #rating_for ⇒ Object
- #rating_for?(element) ⇒ Boolean
Instance Method Details
#is_for ⇒ Object
23 24 25 |
# File 'lib/rating_for/rating.rb', line 23 def is_for self. end |
#is_for?(element) ⇒ Boolean
27 28 29 |
# File 'lib/rating_for/rating.rb', line 27 def is_for?(element) self.(element) end |
#rated_element ⇒ Object
11 12 13 |
# File 'lib/rating_for/rating.rb', line 11 def rated_element self.rateable_element.element end |
#rating_for ⇒ Object
15 16 17 |
# File 'lib/rating_for/rating.rb', line 15 def self.rateable_element.element_attribute end |
#rating_for?(element) ⇒ Boolean
19 20 21 |
# File 'lib/rating_for/rating.rb', line 19 def (element) element.to_s == self. end |