Class: XeroGateway::Report::Cell
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- XeroGateway::Report::Cell
- Defined in:
- lib/xero_gateway/report/cell.rb
Overview
Adds #attributes to the cells we’re grabbing, since Xero Report Cells use XML like: <Cell>
<Value>Interest Income (270)</Value>
<Attributes>
<Attribute>
<Value>e9482110-7245-4a76-bfe2-14500495a076</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
We delegate to the topmost “<Value>” class and decorate with an “attributes” hash for the “attribute: value” pairs
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, new_attributes = {}) ⇒ Cell
constructor
A new instance of Cell.
Constructor Details
#initialize(value, new_attributes = {}) ⇒ Cell
Returns a new instance of Cell.
20 21 22 23 24 |
# File 'lib/xero_gateway/report/cell.rb', line 20 def initialize(value, new_attributes = {}) @value = value @attributes = new_attributes super(value) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
18 19 20 |
# File 'lib/xero_gateway/report/cell.rb', line 18 def attributes @attributes end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
18 19 20 |
# File 'lib/xero_gateway/report/cell.rb', line 18 def value @value end |