Sha256: d5065ab4871de9cf1bf0227b7725ef253a4e4463324fa544197d2252b5d2e9a8

Contents?: true

Size: 475 Bytes

Versions: 26

Compression:

Stored size: 475 Bytes

Contents

module Byebug
  #
  # Custom exception exception to signal "command not found" errors
  #
  class CommandNotFound < NoMethodError
    def initialize(input, parent = nil)
      @input = input
      @parent = parent

      super("Unknown command '#{name}'. Try '#{help}'")
    end

    private

    def name
      build_cmd(@parent, @input)
    end

    def help
      build_cmd('help', @parent)
    end

    def build_cmd(*args)
      args.compact.join(' ')
    end
  end
end

Version data entries

26 entries across 25 versions & 3 rubygems

Version Path
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/byebug-9.1.0/lib/byebug/errors.rb
tdiary-5.0.6 vendor/bundle/gems/byebug-9.1.0/lib/byebug/errors.rb
byebug-9.1.0 lib/byebug/errors.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/errors.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/errors.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/errors.rb
byebug-9.0.6 lib/byebug/errors.rb
byebug-9.0.5 lib/byebug/errors.rb
byebug-9.0.4 lib/byebug/errors.rb
byebug-9.0.3 lib/byebug/errors.rb
byebug-9.0.2 lib/byebug/errors.rb
byebug-9.0.1 lib/byebug/errors.rb
byebug-9.0.0 lib/byebug/errors.rb
byebug-8.2.5 lib/byebug/errors.rb
byebug-8.2.4 lib/byebug/errors.rb
byebug-8.2.3 lib/byebug/errors.rb
byebug-8.2.2 lib/byebug/errors.rb
byebug-8.2.1 lib/byebug/errors.rb
byebug-8.2.0 lib/byebug/errors.rb
byebug-8.1.0 lib/byebug/errors.rb