Class: Xeroizer::Report::Cell

Inherits:
Object
  • Object
show all
Includes:
CellXmlHelper
Defined in:
lib/xeroizer/report/cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CellXmlHelper

included

Constructor Details

#initializeCell

Returns a new instance of Cell.



14
15
16
# File 'lib/xeroizer/report/cell.rb', line 14

def initialize
  @attributes = {}
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



10
11
12
# File 'lib/xeroizer/report/cell.rb', line 10

def attributes
  @attributes
end

#valueObject

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_idObject

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_valueObject

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