Class: Kennel::Syncer::Types::PlannedUpdate

Inherits:
PlannedChange show all
Defined in:
lib/kennel/syncer/types.rb

Constant Summary collapse

TYPE =
:update

Instance Attribute Summary collapse

Attributes inherited from PlannedChange

#klass, #tracking_id

Instance Method Summary collapse

Methods inherited from PlannedChange

#api_resource, #url

Constructor Details

#initialize(expected, actual, diff) ⇒ PlannedUpdate

Returns a new instance of PlannedUpdate.



41
42
43
44
45
46
47
# File 'lib/kennel/syncer/types.rb', line 41

def initialize(expected, actual, diff)
  super(expected.class, expected.tracking_id)
  @expected = expected
  @actual = actual
  @diff = diff
  @id = actual.fetch(:id)
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



53
54
55
# File 'lib/kennel/syncer/types.rb', line 53

def actual
  @actual
end

#diffObject (readonly)

Returns the value of attribute diff.



53
54
55
# File 'lib/kennel/syncer/types.rb', line 53

def diff
  @diff
end

#expectedObject (readonly)

Returns the value of attribute expected.



53
54
55
# File 'lib/kennel/syncer/types.rb', line 53

def expected
  @expected
end

#idObject (readonly)

Returns the value of attribute id.



53
54
55
# File 'lib/kennel/syncer/types.rb', line 53

def id
  @id
end

Instance Method Details

#changeObject



49
50
51
# File 'lib/kennel/syncer/types.rb', line 49

def change
  super(id)
end