Class: Commander::Command::Options

### Home Classes Methods

### In Files

- lib/commander/command.rb

### Parent

Object

### Methods

- ::new
- #__hash__
- #default
- #inspect
- #method_missing

### Included Modules

- Blank

### Class/Module Index

Quicksearch

- Commander
- Commander::Command
- Commander::Command::Options
- Commander::Delegates
- Commander::HelpFormatter
- Commander::HelpFormatter::Base
- Commander::HelpFormatter::Terminal
- Commander::HelpFormatter::TerminalCompact
- Commander::Platform
- Commander::Runner
- Commander::Runner::CommandError
- Commander::Runner::InvalidCommandError
- Commander::UI
- Commander::UI::AskForClass
- Commander::UI::ProgressBar
- Array
- Blank
- Object

No matching classes.

# Commander::Command::Options

Options struct.

### Public Class Methods

new() click to toggle source

    # File lib/commander/command.rb, line 16
    def initialize
      @table = {}
    end

### Public Instance Methods

__hash__() click to toggle source

    # File lib/commander/command.rb, line 20
    def __hash__
      @table
    end

default(defaults = {}) click to toggle source

    # File lib/commander/command.rb, line 28
    def default defaults = {}
      @table = defaults.merge! @table
    end

inspect() click to toggle source

    # File lib/commander/command.rb, line 32
    def inspect
      "<Commander::Command::Options #{ __hash__.map { |k,v| "#{k}=#{v.inspect}" }.join(', ') }>"
    end

method_missing(meth, *args, &block) click to toggle source

    # File lib/commander/command.rb, line 24
    def method_missing meth, *args, &block
      meth.to_s =~ /=$/ ? @table[meth.to_s.chop.to_sym] = args.first : @table[meth]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.