Class: ObjectiveCommand::Shell::Simple

Inherits:
Object
  • Object
show all
Includes:
MethodMissing
Defined in:
lib/objective_command/shell.rb

Overview

module MethodMissing

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MethodMissing

#method_missing

Constructor Details

#initialize(runner = nil, options = nil, &block) ⇒ Simple

Returns a new instance of Simple.



38
39
40
41
42
43
44
# File 'lib/objective_command/shell.rb', line 38

def initialize runner=nil, options=nil, &block
  @runner = runner || OCmd::Runners::System.new
  @shell_options = options || {}
  other_opts = @shell_options.keys - [:frozen]
  @runner.apply_options other_opts
  block.bind(self).call if block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ObjectiveCommand::Shell::MethodMissing

Instance Attribute Details

#runnerObject

Returns the value of attribute runner.



36
37
38
# File 'lib/objective_command/shell.rb', line 36

def runner
  @runner
end

#shell_optionsObject

Returns the value of attribute shell_options.



36
37
38
# File 'lib/objective_command/shell.rb', line 36

def shell_options
  @shell_options
end