Class: Wonkavision::Plugins::Aggregation::Attribute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Attribute

Returns a new instance of Attribute.



9
10
11
12
# File 'lib/wonkavision/plugins/analytics/aggregation/attribute.rb', line 9

def initialize(name,options={})
  @name = name
  @options = options
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/wonkavision/plugins/analytics/aggregation/attribute.rb', line 7

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/wonkavision/plugins/analytics/aggregation/attribute.rb', line 7

def options
  @options
end

Instance Method Details

#extract(message) ⇒ Object



14
15
16
# File 'lib/wonkavision/plugins/analytics/aggregation/attribute.rb', line 14

def extract(message)
  message[name.to_s]
end