Class: Cargowise::Document

Inherits:
AbstractResult show all
Defined in:
lib/cargowise/document.rb

Overview

A document that is associated with a Shipment. Not built directly, but available via the documents() attribute of the Shipment model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractResult

endpoint, #inspect, register, via

Constructor Details

#initialize(node) ⇒ Document

Returns a new instance of Document.



13
14
15
16
17
18
19
# File 'lib/cargowise/document.rb', line 13

def initialize(node)
  @node = node

  @date        = time_value("./Date")
  @description = text_value("./Description")
  @link        = text_value("./Link")
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



11
12
13
# File 'lib/cargowise/document.rb', line 11

def date
  @date
end

#descriptionObject (readonly)

Returns the value of attribute description.



11
12
13
# File 'lib/cargowise/document.rb', line 11

def description
  @description
end

Returns the value of attribute link.



11
12
13
# File 'lib/cargowise/document.rb', line 11

def link
  @link
end