module XeroGateway class Report # Adds #attributes to the cells we're grabbing, since Xero Report Cells use XML like: # # Interest Income (270) # # # e9482110-7245-4a76-bfe2-14500495a076 # account # # # # # We delegate to the topmost "" class and decorate with an "attributes" hash # for the "attribute: value" pairs class Cell < SimpleDelegator attr_reader :attributes, :value def initialize(value, new_attributes = {}) @value = value @attributes = new_attributes super(value) end end end end