Class: Ocar::Status
- Inherits:
-
Object
- Object
- Ocar::Status
- Defined in:
- lib/ocar/status.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(json) ⇒ Status
Returns a new instance of Status.
6 7 8 9 10 11 12 13 |
# File 'lib/ocar/status.rb', line 6 def initialize(json) @number = json['data'][0]['numeroPieza'].to_s @owner = json['data'][0]['titular'] @description = json['data'][0]['descripcion'] @date = json['data'][0]['fecha'] @location = json['data'][0]['sucursal'] @type = json['data'][0]['tipo'] end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
4 5 6 |
# File 'lib/ocar/status.rb', line 4 def date @date end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/ocar/status.rb', line 4 def description @description end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
4 5 6 |
# File 'lib/ocar/status.rb', line 4 def location @location end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/ocar/status.rb', line 4 def number @number end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
4 5 6 |
# File 'lib/ocar/status.rb', line 4 def owner @owner end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/ocar/status.rb', line 4 def type @type end |