Class: Specinfra::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/specinfra/runner.rb

Class Method Summary collapse

Class Method Details

.method_missing(meth, *args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/specinfra/runner.rb', line 3

def self.method_missing(meth, *args)
  backend   = Specinfra.backend
  processor = Specinfra::Processor
  
  if ! os.include?(:family) || os[:family] != 'windows'
    if processor.respond_to?(meth)
      processor.send(meth, *args)
    elsif backend.respond_to?(meth)
      backend.send(meth, *args)
    else
      run(meth, *args)
    end
  else
    if backend.respond_to?(meth)
      backend.send(meth, *args)
    else
      run(meth, *args)
    end
  end
end