class ErbAsterisk::ArgParser

Public Instance Methods

execute() click to toggle source
# File lib/erb_asterisk/arg_parser.rb, line 6
def execute
  Slop.parse do |o|
    o.banner = 'usage: erb_asterisk [options] [asterisk_config_path]'

    o.string '-t', '--templates',
             'set templates path (e.g.: ~/.erb_asterisk)'
    o.bool '-v', '--verbose', 'enable verbose mode'

    o.on '--version', 'print the version' do
      puts "#{VERSION}"
      exit
    end

    o.on '-h', '--help', 'print this help' do
      puts o
      exit
    end
  end
end