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
abiquo-etk-0.4.18 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.17 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.16 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.15 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.14 vendor/options-2.3.0/samples/d.rb
abiquo-etk-0.4.13 vendor/options-2.3.0/samples/d.rb
options-2.3.0 samples/d.rb
options-2.2.0 samples/d.rb