OptionParser::Arguable (Module)

In: optparse.rb

Methods

extend_object   new   options   options=   order!   parse!   permute!  

Public Class methods

[Source]

# File optparse.rb, line 1759
    def self.extend_object(obj)
      super
      obj.instance_eval {@optparse = nil}
    end

[Source]

# File optparse.rb, line 1763
    def initialize(*args)
      super
      @optparse = nil
    end

Public Instance methods

[Source]

# File optparse.rb, line 1734
    def options
      @optparse ||= OptionParser.new
      block_given? or return @optparse
      begin
        yield @optparse
      rescue ParseError
        @optparse.warn $!
        nil
      end
    end

[Source]

# File optparse.rb, line 1710
    def options=(opt)
      unless @optparse = opt
        class << self
          undef_method(:options)
          undef_method(:options=)
        end
      end
    end

[Source]

# File optparse.rb, line 1752
    def order!(&blk) options.order!(self, &blk) end

[Source]

# File optparse.rb, line 1754
    def parse!() options.parse!(self) end

[Source]

# File optparse.rb, line 1753
    def permute!() options.permute!(self) end

[Validate]