Class: Kennel::Syncer::Types::PlannedChange
- Inherits:
-
Object
- Object
- Kennel::Syncer::Types::PlannedChange
- Defined in:
- lib/kennel/syncer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#tracking_id ⇒ Object
readonly
Returns the value of attribute tracking_id.
Instance Method Summary collapse
- #api_resource ⇒ Object
- #change(id = nil) ⇒ Object
-
#initialize(klass, tracking_id) ⇒ PlannedChange
constructor
A new instance of PlannedChange.
- #url(id = nil) ⇒ Object
Constructor Details
#initialize(klass, tracking_id) ⇒ PlannedChange
Returns a new instance of PlannedChange.
317 318 319 320 |
# File 'lib/kennel/syncer.rb', line 317 def initialize(klass, tracking_id) @klass = klass @tracking_id = tracking_id end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
334 335 336 |
# File 'lib/kennel/syncer.rb', line 334 def klass @klass end |
#tracking_id ⇒ Object (readonly)
Returns the value of attribute tracking_id.
334 335 336 |
# File 'lib/kennel/syncer.rb', line 334 def tracking_id @tracking_id end |
Instance Method Details
#api_resource ⇒ Object
322 323 324 |
# File 'lib/kennel/syncer.rb', line 322 def api_resource klass.api_resource end |
#change(id = nil) ⇒ Object
330 331 332 |
# File 'lib/kennel/syncer.rb', line 330 def change(id = nil) Change.new(self.class::TYPE, api_resource, tracking_id, id) end |
#url(id = nil) ⇒ Object
326 327 328 |
# File 'lib/kennel/syncer.rb', line 326 def url(id = nil) klass.url(id || self.id) end |