Class: Trackablaze::Metric
- Inherits:
-
Object
- Object
- Trackablaze::Metric
- Defined in:
- lib/trackablaze/metric.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#name ⇒ Object
Returns the value of attribute name.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #default? ⇒ Boolean
-
#initialize(name, config) ⇒ Metric
constructor
A new instance of Metric.
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
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/trackablaze/metric.rb', line 3 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/trackablaze/metric.rb', line 3 def name @name end |
#title ⇒ Object
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
12 13 14 |
# File 'lib/trackablaze/metric.rb', line 12 def default? @default == true end |