$48 GRAYBYTE WORDPRESS FILE MANAGER $94

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/bundler/vendor/thor/lib/thor/

HOME
Current File : /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/bundler/vendor/thor/lib/thor//error.rb
class Bundler::Thor
  Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable)
                  # In order to support versions of Ruby that don't have keyword
                  # arguments, we need our own spell checker class that doesn't take key
                  # words. Even though this code wouldn't be hit because of the check
                  # above, it's still necessary because the interpreter would otherwise be
                  # unable to parse the file.
                  class NoKwargSpellChecker < DidYouMean::SpellChecker # :nodoc:
                    def initialize(dictionary)
                      @dictionary = dictionary
                    end
                  end

                  DidYouMean::Correctable
                end

  # Bundler::Thor::Error is raised when it's caused by wrong usage of thor classes. Those
  # errors have their backtrace suppressed and are nicely shown to the user.
  #
  # Errors that are caused by the developer, like declaring a method which
  # overwrites a thor keyword, SHOULD NOT raise a Bundler::Thor::Error. This way, we
  # ensure that developer errors are shown with full backtrace.
  class Error < StandardError
  end

  # Raised when a command was not found.
  class UndefinedCommandError < Error
    class SpellChecker
      attr_reader :error

      def initialize(error)
        @error = error
      end

      def corrections
        @corrections ||= spell_checker.correct(error.command).map(&:inspect)
      end

      def spell_checker
        NoKwargSpellChecker.new(error.all_commands)
      end
    end

    attr_reader :command, :all_commands

    def initialize(command, all_commands, namespace)
      @command = command
      @all_commands = all_commands

      message = "Could not find command #{command.inspect}"
      message = namespace ? "#{message} in #{namespace.inspect} namespace." : "#{message}."

      super(message)
    end

    prepend Correctable if Correctable
  end
  UndefinedTaskError = UndefinedCommandError

  class AmbiguousCommandError < Error
  end
  AmbiguousTaskError = AmbiguousCommandError

  # Raised when a command was found, but not invoked properly.
  class InvocationError < Error
  end

  class UnknownArgumentError < Error
    class SpellChecker
      attr_reader :error

      def initialize(error)
        @error = error
      end

      def corrections
        @corrections ||=
          error.unknown.flat_map { |unknown| spell_checker.correct(unknown) }.uniq.map(&:inspect)
      end

      def spell_checker
        @spell_checker ||= NoKwargSpellChecker.new(error.switches)
      end
    end

    attr_reader :switches, :unknown

    def initialize(switches, unknown)
      @switches = switches
      @unknown = unknown

      super("Unknown switches #{unknown.map(&:inspect).join(', ')}")
    end

    prepend Correctable if Correctable
  end

  class RequiredArgumentMissingError < InvocationError
  end

  class MalformattedArgumentError < InvocationError
  end

  if Correctable
    DidYouMean::SPELL_CHECKERS.merge!(
      'Bundler::Thor::UndefinedCommandError' => UndefinedCommandError::SpellChecker,
      'Bundler::Thor::UnknownArgumentError' => UnknownArgumentError::SpellChecker
    )
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 12.00 AM
root / root
0
actions
--
21 Mar 2024 10.21 AM
root / root
0755
core_ext
--
21 Mar 2024 10.21 AM
root / root
0755
line_editor
--
21 Mar 2024 10.21 AM
root / root
0755
parser
--
21 Mar 2024 10.21 AM
root / root
0755
shell
--
21 Mar 2024 10.21 AM
root / root
0755
actions.rb
10.428 KB
30 Mar 2023 12.34 PM
root / root
0644
base.rb
23.891 KB
30 Mar 2023 12.34 PM
root / root
0644
command.rb
4.629 KB
30 Mar 2023 12.34 PM
root / root
0644
error.rb
3.187 KB
30 Mar 2023 12.34 PM
root / root
0644
group.rb
8.853 KB
30 Mar 2023 12.34 PM
root / root
0644
invocation.rb
6.071 KB
30 Mar 2023 12.34 PM
root / root
0644
line_editor.rb
0.382 KB
30 Mar 2023 12.34 PM
root / root
0644
nested_context.rb
0.292 KB
30 Mar 2023 12.34 PM
root / root
0644
parser.rb
0.135 KB
30 Mar 2023 12.34 PM
root / root
0644
rake_compat.rb
2.115 KB
30 Mar 2023 12.34 PM
root / root
0644
runner.rb
9.846 KB
30 Mar 2023 12.34 PM
root / root
0644
shell.rb
2.286 KB
30 Mar 2023 12.34 PM
root / root
0644
util.rb
8.833 KB
30 Mar 2023 12.34 PM
root / root
0644
version.rb
0.043 KB
30 Mar 2023 12.34 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF