Class: Xeroizer::Report::Cell
- Inherits:
-
Object
- Object
- Xeroizer::Report::Cell
- Includes:
- CellXmlHelper
- Defined in:
- lib/xeroizer/report/cell.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#attribute_id ⇒ Object
Return first attribute’s ID in the hash.
-
#attribute_value ⇒ Object
Return first attribute’s value in the hash.
-
#initialize ⇒ Cell
constructor
A new instance of Cell.
Methods included from CellXmlHelper
Constructor Details
#initialize ⇒ Cell
Returns a new instance of Cell.
14 15 16 |
# File 'lib/xeroizer/report/cell.rb', line 14 def initialize @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
10 11 12 |
# File 'lib/xeroizer/report/cell.rb', line 10 def attributes @attributes end |
#value ⇒ Object
Returns the value of attribute value.
9 10 11 |
# File 'lib/xeroizer/report/cell.rb', line 9 def value @value end |
Instance Method Details
#attribute_id ⇒ Object
Return first attribute’s ID in the hash. Assumes there is only one as hashes get out of order. In all cases I’ve seen so far there is only one attribute returned.
20 21 22 |
# File 'lib/xeroizer/report/cell.rb', line 20 def attribute_id @attributes.each { | id, value | return id } end |
#attribute_value ⇒ Object
Return first attribute’s value in the hash. Assumes there is only one as hashes get out of order. In all cases I’ve seen so far there is only one attribute returned.
26 27 28 |
# File 'lib/xeroizer/report/cell.rb', line 26 def attribute_value @attributes.each { | id, value | return value } end |