Class: Hawkular::Metrics::BaseObject

Inherits:
Object
  • Object
show all
Defined in:
lib/hawkular/metrics/types.rb

Direct Known Subclasses

MetricDefinition, Tenant

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BaseObject

Returns a new instance of BaseObject



7
8
9
10
# File 'lib/hawkular/metrics/types.rb', line 7

def initialize(json)
  @json = json
  @id = @json['id'] unless json.nil?
end

Instance Attribute Details

#idObject

Returns the value of attribute id



5
6
7
# File 'lib/hawkular/metrics/types.rb', line 5

def id
  @id
end

#jsonObject (readonly)

Returns the value of attribute json



4
5
6
# File 'lib/hawkular/metrics/types.rb', line 4

def json
  @json
end