Class: YTools::BaseCLI

Inherits:
Object
  • Object
show all
Defined in:
lib/ytools/basecli.rb

Direct Known Subclasses

Path::CLI, Templates::CLI

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ BaseCLI

Returns a new instance of BaseCLI.



7
8
9
# File 'lib/ytools/basecli.rb', line 7

def initialize(args)
  @args = args.dup
end

Instance Method Details

#commandObject



19
20
21
# File 'lib/ytools/basecli.rb', line 19

def command
  # overridden
end

#execute!Object



11
12
13
# File 'lib/ytools/basecli.rb', line 11

def execute!
  tail(command).execute!(@args)
end

#parse(propagate = nil) ⇒ Object



15
16
17
# File 'lib/ytools/basecli.rb', line 15

def parse(propagate=nil)
  tail(command).parse!(@args, propagate)
end