Method: Sym::Application#initialize
- Defined in:
- lib/sym/application.rb
#initialize(opts, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = nil) ⇒ Application
Returns a new instance of Application.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/sym/application.rb', line 34 def initialize(opts, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = nil) self.stdin = stdin self.stdout = stdout self.stderr = stderr self.kernel = kernel self.opts_slop = opts.clone self.opts = opts.is_a?(Hash) ? opts : opts.to_hash process_negated_option(opts[:negate]) if opts[:negate] process_edit_option self.args = ::Sym::App::Args.new(self.) initialize_output_stream initialize_action initialize_data_source initialize_password_cache initialize_input_handler end |