Class: Hawkular::Inventory::Operation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op_hash) ⇒ Operation

Returns a new instance of Operation.



42
43
44
45
# File 'lib/hawkular/inventory/entities.rb', line 42

def initialize(op_hash)
  @name = op_hash['name']
  @params = op_hash.key?('parameters') ? op_hash['parameters'] : {}
end

Instance Attribute Details

#nameString (readonly)

Returns Name of the operation.

Returns:

  • (String)

    Name of the operation



39
40
41
# File 'lib/hawkular/inventory/entities.rb', line 39

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params.



40
41
42
# File 'lib/hawkular/inventory/entities.rb', line 40

def params
  @params
end