Class: ModelFormFacade::MockObject
- Inherits:
-
Object
- Object
- ModelFormFacade::MockObject
- Defined in:
- lib/model_form_facade.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MockObject
constructor
A new instance of MockObject.
Constructor Details
#initialize ⇒ MockObject
Returns a new instance of MockObject.
116 117 118 |
# File 'lib/model_form_facade.rb', line 116 def initialize self.attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
107 108 109 |
# File 'lib/model_form_facade.rb', line 107 def attributes @attributes end |
Class Method Details
.define_writer(write_method) ⇒ Object
109 110 111 112 113 114 |
# File 'lib/model_form_facade.rb', line 109 def self.define_writer(write_method) key = write_method.to_s.delete_suffix("=") define_method(write_method) do |v| attributes[key] = v end end |