Class: AdequateSerialization::Steps::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/adequate_serialization/steps.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#objectObject (readonly)

Returns the value of attribute object.



15
16
17
# File 'lib/adequate_serialization/steps.rb', line 15

def object
  @object
end

#optsObject (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