Method: Pry::CommandSet#find_command_by_match_or_listing
- Defined in:
- lib/pry/command_set.rb
#find_command_by_match_or_listing(match_or_listing) ⇒ Command
Returns The command object matched.
173 174 175 176 177 |
# File 'lib/pry/command_set.rb', line 173 def find_command_by_match_or_listing(match_or_listing) cmd = (@commands[match_or_listing] || Pry::Helpers::BaseHelpers.find_command(match_or_listing, @commands)) cmd || raise(ArgumentError, "cannot find a command: '#{match_or_listing}'") end |