Module: Rateme::Macros::RequiredMethods
- Defined in:
- lib/rateme/macros.rb
Instance Method Summary collapse
Instance Method Details
#rate(value, options = {}) ⇒ Object
31 32 33 |
# File 'lib/rateme/macros.rb', line 31 def rate(value, = {}) .create(.merge({ :value => value })) end |
#rating ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/rateme/macros.rb', line 23 def if ( = .average(:value)) else 0.to_f end end |
#rating_range ⇒ Object
35 36 37 |
# File 'lib/rateme/macros.rb', line 35 def .. end |