Class: DJI::DHL::Checkpoint
- Inherits:
-
Object
- Object
- DJI::DHL::Checkpoint
- Defined in:
- lib/dji/dhl/checkpoint.rb
Instance Attribute Summary collapse
-
#counter ⇒ Object
Returns the value of attribute counter.
-
#date_value ⇒ Object
Returns the value of attribute date_value.
-
#datetime ⇒ Object
Returns the value of attribute datetime.
-
#description ⇒ Object
Returns the value of attribute description.
-
#time_value ⇒ Object
Returns the value of attribute time_value.
Class Method Summary collapse
Instance Attribute Details
#counter ⇒ Object
Returns the value of attribute counter.
7 8 9 |
# File 'lib/dji/dhl/checkpoint.rb', line 7 def counter @counter end |
#date_value ⇒ Object
Returns the value of attribute date_value.
9 10 11 |
# File 'lib/dji/dhl/checkpoint.rb', line 9 def date_value @date_value end |
#datetime ⇒ Object
Returns the value of attribute datetime.
10 11 12 |
# File 'lib/dji/dhl/checkpoint.rb', line 10 def datetime @datetime end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/dji/dhl/checkpoint.rb', line 8 def description @description end |
#time_value ⇒ Object
Returns the value of attribute time_value.
9 10 11 |
# File 'lib/dji/dhl/checkpoint.rb', line 9 def time_value @time_value end |
Class Method Details
.new_from_item(item) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/dji/dhl/checkpoint.rb', line 14 def new_from_item(item) c = Checkpoint.new c.counter = item['counter'] c.description = item['description'] c.time_value = item['time'] c.date_value = item['date'] c.datetime = Time.parse("#{c.date_value}#{c.time_value}") c end |