Module OptionParser::Arguable
In: optparse.rb

Methods

extend_object   new   options   options=   order!   parse!   permute!  

Public Class methods

[Source]

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

[Source]

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

Public Instance methods

[Source]

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

[Source]

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

[Source]

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

[Source]

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

[Source]

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

[Validate]