Sha256: 72d8e7bde165eca3df406ae24c4a5f8bbd8c06657378ef8d2a49c5d98c87e39e

Contents?: true

Size: 347 Bytes

Versions: 53

Compression:

Stored size: 347 Bytes

Contents

require 'main'

ARGV.replace %w( foo=40 foo=2 bar=false ) if ARGV.empty?

Main {
  keyword('foo'){
    required  # by default keywords are not required
    arity 2
    cast :float
  }
  keyword('bar'){
    cast :bool
  }

  def run
    p params['foo'].given?
    p params['foo'].values
    p params['bar'].given?
    p params['bar'].value
  end
}

Version data entries

53 entries across 52 versions & 3 rubygems

Version Path
main-6.3.0 samples/c.rb
main-6.2.3 samples/c.rb
main-6.2.2 samples/c.rb
main-6.2.1 samples/c.rb
main-6.2.0 samples/c.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/c.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/c.rb
main-6.1.0 samples/c.rb
ahoward-main-2.9.0 samples/c.rb
main-6.0.0 samples/c.rb
main-5.3.2 samples/c.rb
main-5.3.1 samples/c.rb
main-5.2.0 samples/c.rb
main-5.1.1 samples/c.rb
main-5.1.0 samples/c.rb
main-5.0.1 samples/c.rb
main-5.0.0 samples/c.rb
main-4.8.1 samples/c.rb
main-4.8.0 samples/c.rb
main-4.7.7 samples/c.rb