Class: SimplestStatus::ModelMethods
- Inherits:
-
Object
- Object
- SimplestStatus::ModelMethods
- Defined in:
- lib/simplest_status/model_methods.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#statuses ⇒ Object
readonly
Returns the value of attribute statuses.
Instance Method Summary collapse
- #add ⇒ Object
-
#initialize(model, statuses) ⇒ ModelMethods
constructor
A new instance of ModelMethods.
Constructor Details
#initialize(model, statuses) ⇒ ModelMethods
Returns a new instance of ModelMethods.
5 6 7 8 |
# File 'lib/simplest_status/model_methods.rb', line 5 def initialize(model, statuses) @model = model @statuses = statuses end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
3 4 5 |
# File 'lib/simplest_status/model_methods.rb', line 3 def model @model end |
#statuses ⇒ Object (readonly)
Returns the value of attribute statuses.
3 4 5 |
# File 'lib/simplest_status/model_methods.rb', line 3 def statuses @statuses end |
Instance Method Details
#add ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/simplest_status/model_methods.rb', line 10 def add define_statuses_accessor_for statuses populate_statuses process_each_status define_status_label_method_for statuses set_validations_for statuses end |