Class: Hawkular::Inventory::MetricType

Inherits:
BaseEntity
  • Object
show all
Includes:
MetricFields
Defined in:
lib/hawkular/inventory/entities.rb

Overview

Definition of a Metric Type inside the inventory.

Instance Attribute Summary

Attributes included from MetricFields

#collection_interval, #type, #unit

Attributes inherited from BaseEntity

#env, #feed, #id, #name, #path, #properties

Instance Method Summary collapse

Methods inherited from BaseEntity

#==, #to_h

Constructor Details

#initialize(type_hash) ⇒ MetricType

Returns a new instance of MetricType



94
95
96
97
98
99
# File 'lib/hawkular/inventory/entities.rb', line 94

def initialize(type_hash)
  super(type_hash)
  @type = type_hash['type']
  @unit = type_hash['unit']
  @collection_interval = type_hash['collectionInterval']
end