Method: ObjectiveCommand::Shell::Simple#initialize

Defined in:
lib/objective_command/shell.rb

#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