class Commands::ParamOption
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Commands::CommandOption::new
# File lib/commands.rb, line 1314 def initialize(*args) super(*args) @params = [] end
Public Instance Methods
attach(commands)
click to toggle source
Calls superclass method
Commands::CommandOption#attach
# File lib/commands.rb, line 1319 def attach(commands) command = super(commands) if match = @arg.match(/([^=]+)=(.*)/) then command.option(@name, @field_symbol, { :key => match[1], :value => match[2] }) else raise RuntimeError, "Expected '#{@arg}' to be in the form VARIABLE=VALUE" end return command end