Class: AdequateSerialization::Steps::Response
- Inherits:
-
Object
- Object
- AdequateSerialization::Steps::Response
- Defined in:
- lib/adequate_serialization/steps.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(object, opts = {}) ⇒ Response
constructor
A new instance of Response.
- #mutate(new_object) ⇒ Object
Constructor Details
#initialize(object, opts = {}) ⇒ Response
Returns a new instance of Response.
17 18 19 20 |
# File 'lib/adequate_serialization/steps.rb', line 17 def initialize(object, opts = {}) @object = object @opts = opts end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
15 16 17 |
# File 'lib/adequate_serialization/steps.rb', line 15 def object @object end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
15 16 17 |
# File 'lib/adequate_serialization/steps.rb', line 15 def opts @opts end |
Instance Method Details
#mutate(new_object) ⇒ Object
22 23 24 |
# File 'lib/adequate_serialization/steps.rb', line 22 def mutate(new_object) self.class.new(new_object, opts) end |