Class: Trackablaze::Metric

Inherits:
Object
  • Object
show all
Defined in:
lib/trackablaze/metric.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, config) ⇒ Metric

Returns a new instance of Metric.



5
6
7
8
9
10
# File 'lib/trackablaze/metric.rb', line 5

def initialize(name, config)
  @name = name
  @title = config['title']
  @default = config['default']
  @config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



3
4
5
# File 'lib/trackablaze/metric.rb', line 3

def config
  @config
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/trackablaze/metric.rb', line 3

def name
  @name
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/trackablaze/metric.rb', line 3

def title
  @title
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/trackablaze/metric.rb', line 12

def default?
  @default == true
end