Class: IRB::Kit::Commands::Descendants

Inherits:
Command::Base
  • Object
show all
Defined in:
lib/irb/kit/commands/descendants.rb

Overview

Answers descendants of a class.

Constant Summary collapse

MONIKER =
:descendants

Instance Method Summary collapse

Constructor Details

#initialize(context, handler: Handlers::Descender.new) ⇒ Descendants

Returns a new instance of Descendants.



24
25
26
27
# File 'lib/irb/kit/commands/descendants.rb', line 24

def initialize context, handler: Handlers::Descender.new
  super context
  @handler = handler
end

Instance Method Details

#execute(name) ⇒ Object



29
# File 'lib/irb/kit/commands/descendants.rb', line 29

def execute(name) = handler.call(name)