ruby/lib/irb/helper_method.rb
Hiroshi SHIBATA 077558ee2b
[Bug #20511] Update reline-0.5.7 (#10848)
* Update reline-0.5.7

* Update irb-1.13.1
2024-05-28 15:54:39 -07:00

29 lines
657 B
Ruby

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