Sha256: 9ff8408291b0690a61846f2835760eb17dd135ceccf84c1f5e125ba4fc6fa889

Contents?: true

Size: 508 Bytes

Versions: 4

Compression:

Stored size: 508 Bytes

Contents

require 'slop'
require 'erb_asterisk/version'

module ErbAsterisk
  class ArgParser
    def execute
      Slop.parse do |o|
        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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
erb_asterisk-0.0.17 lib/erb_asterisk/arg_parser.rb
erb_asterisk-0.0.16 lib/erb_asterisk/arg_parser.rb
erb_asterisk-0.0.15 lib/erb_asterisk/arg_parser.rb
erb_asterisk-0.0.14 lib/erb_asterisk/arg_parser.rb