Class: Cargowise::Document
- Inherits:
-
AbstractResult
- Object
- AbstractResult
- Cargowise::Document
- 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
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
Instance Method Summary collapse
-
#initialize(node) ⇒ Document
constructor
A new instance of Document.
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
#date ⇒ Object (readonly)
Returns the value of attribute date.
11 12 13 |
# File 'lib/cargowise/document.rb', line 11 def date @date end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/cargowise/document.rb', line 11 def description @description end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
11 12 13 |
# File 'lib/cargowise/document.rb', line 11 def link @link end |