Sha256: 838cc7f141c2c47421a6e4b05542d9bc1ac4a781a75dd682ff7d6f9c8a60e697

Contents?: true

Size: 657 Bytes

Versions: 9

Compression:

Stored size: 657 Bytes

Contents

require_relative "helper_method/base"

module IRB
  module HelperMethod
    @helper_methods = {}

    class << self
      attr_reader :helper_methods

      def register(name, helper_class)
        @helper_methods[name] = helper_class

        if defined?(HelpersContainer)
          HelpersContainer.install_helper_methods
        end
      end

      def all_helper_methods_info
        @helper_methods.map do |name, helper_class|
          { display_name: name, description: helper_class.description }
        end
      end
    end

    # Default helper_methods
    require_relative "helper_method/conf"
    register(:conf, HelperMethod::Conf)
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/irb-1.14.0/lib/irb/helper_method.rb
irb-1.14.3 lib/irb/helper_method.rb
irb-1.14.2 lib/irb/helper_method.rb
irb-1.14.1 lib/irb/helper_method.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/irb-1.13.2/lib/irb/helper_method.rb
irb-1.14.0 lib/irb/helper_method.rb
irb-1.13.2 lib/irb/helper_method.rb
irb-1.13.1 lib/irb/helper_method.rb
irb-1.13.0 lib/irb/helper_method.rb