Class: ActiveWarehouse::Aggregate::DwarfAggregate::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/active_warehouse/aggregate/dwarf_aggregate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value = nil) ⇒ Cell

Returns a new instance of Cell.



266
267
268
269
# File 'lib/active_warehouse/aggregate/dwarf_aggregate.rb', line 266

def initialize(key, value=nil)
  @key = key
  @value = value
end

Instance Attribute Details

#childObject

The child of the cell which will always be a node



260
261
262
# File 'lib/active_warehouse/aggregate/dwarf_aggregate.rb', line 260

def child
  @child
end

#keyObject

The cell key, which will always be a dimension id



258
259
260
# File 'lib/active_warehouse/aggregate/dwarf_aggregate.rb', line 258

def key
  @key
end

#nodeObject

The node that this cell is a member of



264
265
266
# File 'lib/active_warehouse/aggregate/dwarf_aggregate.rb', line 264

def node
  @node
end

#valueObject

The value of the cell which will only be non-nil in the cells that appear in nodes in the last dimension



262
263
264
# File 'lib/active_warehouse/aggregate/dwarf_aggregate.rb', line 262

def value
  @value
end

Instance Method Details

#to_sObject



276
277
278
# File 'lib/active_warehouse/aggregate/dwarf_aggregate.rb', line 276

def to_s
  key
end