Module: FiveStar::Rateable::ClassMethods
- Defined in:
- lib/five-star/rateable.rb
Instance Method Summary collapse
-
#configuration ⇒ FiveStar::Configuration
private
Reference to Configuration used for this
rateableinstance. -
#rate_with(*klasses) ⇒ undefined
Set which rating classes will be used to rate the object using this module.
-
#rating_klasses ⇒ Array
private
Return which rating classes will be used to rate the object using this module.
Instance Method Details
#configuration ⇒ FiveStar::Configuration
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Reference to Configuration used for this rateable instance.
60 61 62 |
# File 'lib/five-star/rateable.rb', line 60 def configuration @configuration ||= Configuration.new end |
#rate_with(*klasses) ⇒ undefined
Set which rating classes will be used to rate the object using this module. Each class must implement the rater methods, see FiveStar::BaseRater
37 38 39 |
# File 'lib/five-star/rateable.rb', line 37 def rate_with(*klasses) @rating_klasses = Array(klasses) end |
#rating_klasses ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return which rating classes will be used to rate the object using this module.
49 50 51 |
# File 'lib/five-star/rateable.rb', line 49 def @rating_klasses ||= [] end |