class Hawkular::Inventory::ResourceType
Attributes
id[R]
@return [String] Id of the resource type
operations[R]
@return [List<Operation>] Operations
associated with this type
properties[R]
@return [Hash<String,String>] Properties of this resource type
Public Class Methods
new(hash)
click to toggle source
# File lib/hawkular/inventory/entities.rb 56 def initialize(hash) 57 @id = hash['id'] 58 @properties = hash['properties'] || {} 59 @operations = (hash['operations'] || []).map { |op| Operation.new(op) } 60 @_hash = hash.dup 61 end
Public Instance Methods
==(other)
click to toggle source
# File lib/hawkular/inventory/entities.rb 63 def ==(other) 64 equal?(other) || other.class == self.class && other.id == @id 65 end
to_h()
click to toggle source
Returns a hash representation of the resource type @return [Hash<String,Object>] hash of the resource type
# File lib/hawkular/inventory/entities.rb 69 def to_h 70 @_hash.dup 71 end