Class: Customization
- Inherits:
-
Object
- Object
- Customization
- Extended by:
- EnumerateIt
- Defined in:
- app/models/customization.rb
Instance Attribute Summary collapse
-
#customization_data_source ⇒ Object
writeonly
Sets the attribute customization_data_source.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(state, model, options = {}) ⇒ Customization
constructor
A new instance of Customization.
- #to_s ⇒ Object
Constructor Details
#initialize(state, model, options = {}) ⇒ Customization
Returns a new instance of Customization.
8 9 10 11 12 |
# File 'app/models/customization.rb', line 8 def initialize(state, model, = {}) @state = state @model = model @source = [:source] end |
Instance Attribute Details
#customization_data_source=(value) ⇒ Object
Sets the attribute customization_data_source
6 7 8 |
# File 'app/models/customization.rb', line 6 def customization_data_source=(value) @customization_data_source = value end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
4 5 6 |
# File 'app/models/customization.rb', line 4 def model @model end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'app/models/customization.rb', line 4 def state @state end |
Instance Method Details
#data ⇒ Object
20 21 22 |
# File 'app/models/customization.rb', line 20 def data @data ||= load_data end |
#to_s ⇒ Object
16 17 18 |
# File 'app/models/customization.rb', line 16 def to_s "#{state} - #{model_humanize}" end |