Class: Fleetctl::Runner::Runner

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

Direct Known Subclasses

SSH, Shell

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*command) ⇒ Runner

Returns a new instance of Runner.



6
7
8
# File 'lib/fleetctl/runner/runner.rb', line 6

def initialize(*command)
  @command = [*command].flatten.compact.join(' ')
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



4
5
6
# File 'lib/fleetctl/runner/runner.rb', line 4

def command
  @command
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



4
5
6
# File 'lib/fleetctl/runner/runner.rb', line 4

def exit_code
  @exit_code
end

#exit_signalObject (readonly)

Returns the value of attribute exit_signal.



4
5
6
# File 'lib/fleetctl/runner/runner.rb', line 4

def exit_signal
  @exit_signal
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/fleetctl/runner/runner.rb', line 4

def status
  @status
end

#stderr_dataObject (readonly)

Returns the value of attribute stderr_data.



4
5
6
# File 'lib/fleetctl/runner/runner.rb', line 4

def stderr_data
  @stderr_data
end

#stdout_dataObject (readonly)

Returns the value of attribute stdout_data.



4
5
6
# File 'lib/fleetctl/runner/runner.rb', line 4

def stdout_data
  @stdout_data
end

Instance Method Details

#outputObject



14
15
16
# File 'lib/fleetctl/runner/runner.rb', line 14

def output
  @output || run
end

#runObject



10
11
12
# File 'lib/fleetctl/runner/runner.rb', line 10

def run(*)
  fail NotImplementedError
end