Class: Rundock::Operation::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rundock/operation/base.rb

Direct Known Subclasses

Command, Deploy, HostInventory, SampleOperation, Task

Constant Summary collapse

OperationNotImplementedError =
Class.new(NotImplementedError)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instruction, attributes) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
# File 'lib/rundock/operation/base.rb', line 9

def initialize(instruction, attributes)
  @instruction = instruction
  @attributes = attributes
  @attributes = {} unless attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



7
8
9
# File 'lib/rundock/operation/base.rb', line 7

def attributes
  @attributes
end

#instructionObject (readonly)

Returns the value of attribute instruction.



6
7
8
# File 'lib/rundock/operation/base.rb', line 6

def instruction
  @instruction
end

Instance Method Details

#run(backend, attributes = {}) ⇒ Object



15
16
17
# File 'lib/rundock/operation/base.rb', line 15

def run(backend, attributes = {})
  raise OperationNotImplementedError
end