Module: IRB::HelperMethod

Defined in:
lib/irb/helper_method.rb,
lib/irb/helper_method/base.rb,
lib/irb/helper_method/conf.rb

Defined Under Namespace

Classes: Base, Conf

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.helper_methodsObject (readonly)

Returns the value of attribute helper_methods.



8
9
10
# File 'lib/irb/helper_method.rb', line 8

def helper_methods
  @helper_methods
end

Class Method Details

.all_helper_methods_infoObject



18
19
20
21
22
# File 'lib/irb/helper_method.rb', line 18

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

.register(name, helper_class) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/irb/helper_method.rb', line 10

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

  if defined?(HelpersContainer)
    HelpersContainer.install_helper_methods
  end
end