Sha256: cc95210bf8449255d69fdfe649b86d23265afdbb3b4e989071a916ad6448b4ee

Contents?: true

Size: 321 Bytes

Versions: 28

Compression:

Stored size: 321 Bytes

Contents

require 'options'

# options.rb makes it easy to provide good error messages when people
# misuse a method.
#

  def method(*args)
    args, options = Options.parse(args)
    options.validate(:force)

    force = options.getopt(:force, default=false)
    p force
  end

  method(:foo, :bar, :misspelled_option => true)


Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
options-2.3.2 samples/d.rb
options-2.3.1 samples/d.rb
abiquo-etk-0.6.4 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.6.3 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.6.2 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.6.1 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.6.0 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.5.9 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.5.8 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.5.3 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.42 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.33 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.32 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.29 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.25 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.24 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.23 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.22 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.20 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.19 vendor/options-2.3.0/samples/d.rb