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