Class: Rundock::Backend::Base

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

Direct Known Subclasses

Local, Ssh

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base



24
25
26
27
# File 'lib/rundock/backend.rb', line 24

def initialize(options)
  @options = parse(options)
  @backend = create_specinfra_backend
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object (private)



75
76
77
# File 'lib/rundock/backend.rb', line 75

def method_missing(method, *args)
  @backend.send(method, *args)
end

Instance Attribute Details

#backendObject (readonly)

Returns the value of attribute backend.



22
23
24
# File 'lib/rundock/backend.rb', line 22

def backend
  @backend
end

#optionsObject (readonly)

Returns the value of attribute options.



21
22
23
# File 'lib/rundock/backend.rb', line 21

def options
  @options
end

Instance Method Details

#run_commands(cmd, exec_options = {}) ⇒ Object



29
30
31
32
33
# File 'lib/rundock/backend.rb', line 29

def run_commands(cmd, exec_options = {})
  Array(cmd).each do |c|
    run_command(c, exec_options)
  end
end