class Commands::OptionWithArg
Public Instance Methods
attach(commands)
click to toggle source
Calls superclass method
Commands::CommandOption#attach
# File lib/commands.rb, line 1258 def attach(commands) command = super(commands) if @pattern && ! @arg.match(@pattern) then raise RuntimeError, "Expected argument to #{@name} to match #{@pattern.inspect}, but it didn't" end command.option(@name, @field_symbol, @arg) return command end