Class: Wonkavision::Analytics::CellSet::Member

Inherits:
Object
  • Object
show all
Defined in:
lib/wonkavision/plugins/analytics/cellset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dimension, member_data) ⇒ Member

Returns a new instance of Member.



99
100
101
102
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 99

def initialize(dimension,member_data)
  @dimension = dimension
  @attributes = member_data
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



98
99
100
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 98

def attributes
  @attributes
end

#dimensionObject (readonly)

Returns the value of attribute dimension.



98
99
100
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 98

def dimension
  @dimension
end

Instance Method Details

#<=>(other) ⇒ Object



112
113
114
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 112

def <=>(other)
  sort <=> other.sort
end

#captionObject



103
104
105
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 103

def caption
  attributes[dimension.definition.caption.to_s]
end

#keyObject



106
107
108
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 106

def key
  attributes[dimension.definition.key.to_s]
end

#sortObject



109
110
111
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 109

def sort
  attributes[dimension.definition.sort.to_s]
end

#to_sObject



115
116
117
# File 'lib/wonkavision/plugins/analytics/cellset.rb', line 115

def to_s
  key.to_s
end