Class: SpecI18n::CommandLine::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/spec-i18n/command_line/main.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, out_stream = STDOUT, error_stream = STDERR) ⇒ Main

Returns a new instance of Main.



11
12
13
14
15
# File 'lib/spec-i18n/command_line/main.rb', line 11

def initialize(args, out_stream = STDOUT, error_stream = STDERR)
  @args = args
  @out_stream = out_stream
  @error_stream = error_stream
end

Class Method Details

.execute(args) ⇒ Object



7
8
9
# File 'lib/spec-i18n/command_line/main.rb', line 7

def self.execute(args)
  new(args).execute!
end

Instance Method Details

#execute!Object



17
18
19
20
# File 'lib/spec-i18n/command_line/main.rb', line 17

def execute!
  options = Options.new(@out_stream, @error_stream, @args)
  options.parse!(@args) 
end