Class: Effective::CpdSpecialRule
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::CpdSpecialRule
- Defined in:
- app/models/effective/cpd_special_rule.rb
Constant Summary collapse
- CATEGORIES =
['cumulative max credits']
Instance Method Summary collapse
- #cumulative_max_credits? ⇒ Boolean
-
#ruleables ⇒ Object
Right now this is going to be just Effective::CpdCategory objects.
- #to_s ⇒ Object
Instance Method Details
#cumulative_max_credits? ⇒ Boolean
44 45 46 |
# File 'app/models/effective/cpd_special_rule.rb', line 44 def cumulative_max_credits? category == 'cumulative max credits' end |
#ruleables ⇒ Object
Right now this is going to be just Effective::CpdCategory objects
49 50 51 |
# File 'app/models/effective/cpd_special_rule.rb', line 49 def ruleables cpd_rules.map(&:ruleable) end |
#to_s ⇒ Object
36 37 38 39 40 41 42 |
# File 'app/models/effective/cpd_special_rule.rb', line 36 def to_s if cumulative_max_credits? "Cumulative max #{max_credits_per_cycle} credits" else model_name.human end end |