$34 GRAYBYTE WORDPRESS FILE MANAGER $86

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
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//shell.rb
require "rbconfig"

class Bundler::Thor
  module Base
    class << self
      attr_writer :shell

      # Returns the shell used in all Bundler::Thor classes. If you are in a Unix platform
      # it will use a colored log, otherwise it will use a basic one without color.
      #
      def shell
        @shell ||= if ENV["THOR_SHELL"] && !ENV["THOR_SHELL"].empty?
          Bundler::Thor::Shell.const_get(ENV["THOR_SHELL"])
        elsif RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ && !ENV["ANSICON"]
          Bundler::Thor::Shell::Basic
        else
          Bundler::Thor::Shell::Color
        end
      end
    end
  end

  module Shell
    SHELL_DELEGATED_METHODS = [:ask, :error, :set_color, :yes?, :no?, :say, :say_status, :print_in_columns, :print_table, :print_wrapped, :file_collision, :terminal_width]
    attr_writer :shell

    autoload :Basic, File.expand_path("shell/basic", __dir__)
    autoload :Color, File.expand_path("shell/color", __dir__)
    autoload :HTML,  File.expand_path("shell/html", __dir__)

    # Add shell to initialize config values.
    #
    # ==== Configuration
    # shell<Object>:: An instance of the shell to be used.
    #
    # ==== Examples
    #
    #   class MyScript < Bundler::Thor
    #     argument :first, :type => :numeric
    #   end
    #
    #   MyScript.new [1.0], { :foo => :bar }, :shell => Bundler::Thor::Shell::Basic.new
    #
    def initialize(args = [], options = {}, config = {})
      super
      self.shell = config[:shell]
      shell.base ||= self if shell.respond_to?(:base)
    end

    # Holds the shell for the given Bundler::Thor instance. If no shell is given,
    # it gets a default shell from Bundler::Thor::Base.shell.
    def shell
      @shell ||= Bundler::Thor::Base.shell.new
    end

    # Common methods that are delegated to the shell.
    SHELL_DELEGATED_METHODS.each do |method|
      module_eval <<-METHOD, __FILE__, __LINE__ + 1
        def #{method}(*args,&block)
          shell.#{method}(*args,&block)
        end
      METHOD
    end

    # Yields the given block with padding.
    def with_padding
      shell.padding += 1
      yield
    ensure
      shell.padding -= 1
    end

  protected

    # Allow shell to be shared between invocations.
    #
    def _shared_configuration #:nodoc:
      super.merge!(:shell => shell)
    end
  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