Class: SuperDiff::OperationalSequencers::Object

Inherits:
Base
  • Object
show all
Defined in:
lib/super_diff/operational_sequencers/object.rb

Instance Method Summary collapse

Methods inherited from Base

applies_to?, call, #call

Constructor Details

#initialize(*args) ⇒ Object

Returns a new instance of Object.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/super_diff/operational_sequencers/object.rb', line 4

def initialize(*args)
  super(*args)

  @expected_attributes = attribute_names.reduce({}) do |hash, name|
    hash.merge(name => expected.public_send(name))
  end

  @actual_attributes = attribute_names.reduce({}) do |hash, name|
    hash.merge(name => actual.public_send(name))
  end
end