Class: IRB::Kit::Register

Inherits:
Object
  • Object
show all
Defined in:
lib/irb/kit/register.rb

Overview

Loads extensions for namespace.

Constant Summary collapse

ALL =
[:all].freeze

Instance Method Summary collapse

Constructor Details

#initialize(registrar, namespace, all: ALL) ⇒ Register

Returns a new instance of Register.



9
10
11
12
13
# File 'lib/irb/kit/register.rb', line 9

def initialize registrar, namespace, all: ALL
  @registrar = registrar
  @namespace = IRB::Kit.const_get namespace
  @all = all
end

Instance Method Details

#call(*monikers) ⇒ Object



15
# File 'lib/irb/kit/register.rb', line 15

def call(*monikers) = monikers == all ? maximum : only(*monikers)