Class: OptionParser

Inherits:
Object
  • Object
show all
Defined in:
lib/optparse/defaults.rb

Defined Under Namespace

Modules: Defaults

Class Method Summary collapse

Class Method Details

.with_defaults(*args) ⇒ Object



37
38
39
40
41
42
# File 'lib/optparse/defaults.rb', line 37

def self.with_defaults(*args)
  new(*args) do |instance|
    instance.extend(Defaults)
    yield instance if block_given?
  end
end