Class: Kennel::Syncer::Types::PlannedChange
- Inherits:
-
Object
- Object
- Kennel::Syncer::Types::PlannedChange
- Defined in:
- lib/kennel/syncer/types.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.
7 8 9 10 |
# File 'lib/kennel/syncer/types.rb', line 7 def initialize(klass, tracking_id) @klass = klass @tracking_id = tracking_id end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
24 25 26 |
# File 'lib/kennel/syncer/types.rb', line 24 def klass @klass end |
#tracking_id ⇒ Object (readonly)
Returns the value of attribute tracking_id.
24 25 26 |
# File 'lib/kennel/syncer/types.rb', line 24 def tracking_id @tracking_id end |
Instance Method Details
#api_resource ⇒ Object
12 13 14 |
# File 'lib/kennel/syncer/types.rb', line 12 def api_resource klass.api_resource end |
#change(id = nil) ⇒ Object
20 21 22 |
# File 'lib/kennel/syncer/types.rb', line 20 def change(id = nil) Change.new(self.class::TYPE, api_resource, tracking_id, id) end |
#url(id = nil) ⇒ Object
16 17 18 |
# File 'lib/kennel/syncer/types.rb', line 16 def url(id = nil) klass.url(id || self.id) end |