Module: Commander::Patches::ValidateInputs
- Included in:
- Command
- Defined in:
- lib/commander/patches/validate_inputs.rb
Constant Summary collapse
- PatchEnabled =
This is used to switch the Patch off during the original test of Commander. It is VERY MUCH a hack but it works
true
Instance Method Summary collapse
Instance Method Details
#call(args = []) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/commander/patches/validate_inputs.rb', line 14 def call(args = []) return super unless PatchEnabled return super if syntax_parts[0..1] == ['commander', 'help'] # Use defined syntax to validate how many args this command can be # passed. assert_correct_number_of_args!(args) # Invoke original method. super(args) end |