Class: CmdParse::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/pure_m_v_c_gen/commands/command_extensions.rb

Instance Method Summary collapse

Instance Method Details

#default_options(&block) ⇒ Object

injects our common options



4
5
6
7
8
9
10
11
12
# File 'lib/pure_m_v_c_gen/commands/command_extensions.rb', line 4

def default_options(&block)
  CmdParse::OptionParserWrapper.new do |opt|
    opt.on("-h", "--help") do
      self.show_help
      exit
    end
    yield(opt)
  end
end