Class: Skyfall::CarSection

Inherits:
Object
  • Object
show all
Defined in:
lib/skyfall/car_archive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cid, body_data) ⇒ CarSection

Returns a new instance of CarSection.



16
17
18
19
# File 'lib/skyfall/car_archive.rb', line 16

def initialize(cid, body_data)
  @cid = cid
  @body_data = body_data
end

Instance Attribute Details

#cidObject (readonly)

Returns the value of attribute cid.



14
15
16
# File 'lib/skyfall/car_archive.rb', line 14

def cid
  @cid
end

Instance Method Details

#bodyObject



21
22
23
# File 'lib/skyfall/car_archive.rb', line 21

def body
  @body ||= CarArchive.convert_data(CBOR.decode(@body_data))
end