Method: Shell#initialize

Defined in:
lib/shell.rb

#initialize(pwd = Dir.pwd, umask = nil) ⇒ Shell

call-seq:

Shell.new(pwd, umask) -> obj

Creates a Shell object which current directory is set to the process current directory, unless otherwise specified by the pwd argument.



185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/shell.rb', line 185

def initialize(pwd = Dir.pwd, umask = nil)
  @cwd = File.expand_path(pwd)
  @dir_stack = []
  @umask = umask

  @system_path = Shell.default_system_path
  @record_separator = Shell.default_record_separator

  @command_processor = CommandProcessor.new(self)
  @process_controller = ProcessController.new(self)

  @verbose = Shell.verbose
  @debug = Shell.debug
end