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

Inherits:
PlannedChange show all
Defined in:
lib/kennel/syncer.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.



351
352
353
354
355
356
357
# File 'lib/kennel/syncer.rb', line 351

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.



363
364
365
# File 'lib/kennel/syncer.rb', line 363

def actual
  @actual
end

#diffObject (readonly)

Returns the value of attribute diff.



363
364
365
# File 'lib/kennel/syncer.rb', line 363

def diff
  @diff
end

#expectedObject (readonly)

Returns the value of attribute expected.



363
364
365
# File 'lib/kennel/syncer.rb', line 363

def expected
  @expected
end

#idObject (readonly)

Returns the value of attribute id.



363
364
365
# File 'lib/kennel/syncer.rb', line 363

def id
  @id
end

Instance Method Details

#changeObject



359
360
361
# File 'lib/kennel/syncer.rb', line 359

def change
  super(id)
end