Class: RgGen::Core::CLI

Inherits:
Object show all
Defined in:
lib/rggen/core/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(builder = nil) ⇒ CLI

Returns a new instance of CLI.



6
7
8
9
# File 'lib/rggen/core/cli.rb', line 6

def initialize(builder = nil)
  @builder = builder || Builder.create
  @options = Options.new
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



11
12
13
# File 'lib/rggen/core/cli.rb', line 11

def builder
  @builder
end

#optionsObject (readonly)

Returns the value of attribute options.



12
13
14
# File 'lib/rggen/core/cli.rb', line 12

def options
  @options
end

Instance Method Details

#run(args) ⇒ Object



14
15
16
17
# File 'lib/rggen/core/cli.rb', line 14

def run(args)
  options.parse(args)
  runner.run(builder, options)
end