Sha256: f93ef3c863dd066e2af762b58d992f5b3aff9ff8ca6d91edd8a97837f46bfca0

Contents?: true

Size: 447 Bytes

Versions: 15

Compression:

Stored size: 447 Bytes

Contents

#coding: utf-8

require 'optparse'

module Shunkuntype
  class Command
    module Options

      def self.parse!(argv)
        options = {}
        command_parser = OptionParser.new do |opt|
          opt.on_head('-v', '--version','Show program version') do |v|
            puts options.ver
            opt.version = Shunkuntype::VERSION
            exit
          end
        end

        command_parser.parse!(argv)
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
shunkuntype-1.0.15 lib/shunkuntype/options.rb
shunkuntype-1.0.14 lib/shunkuntype/options.rb
shunkuntype-1.0.13 lib/shunkuntype/options.rb
shunkuntype-1.0.12 lib/shunkuntype/options.rb
shunkuntype-1.0.11 lib/shunkuntype/options.rb
shunkuntype-1.0.10 lib/shunkuntype/options.rb
shunkuntype-1.0.9 lib/shunkuntype/options.rb
shunkuntype-1.0.7 lib/shunkuntype/options.rb
shunkuntype-1.0.6 lib/shunkuntype/options.rb
shunkuntype-1.0.5 lib/shunkuntype/options.rb
shunkuntype-1.0.4 lib/shunkuntype/options.rb
shunkuntype-1.0.3 lib/shunkuntype/options.rb
shunkuntype-1.0.2 lib/shunkuntype/options.rb
shunkuntype-1.0.1a lib/shunkuntype/options.rb
shunkuntype-1.0.1 lib/shunkuntype/options.rb