Class: Command::Help

Inherits:
Pry::ClassCommand
  • Object
show all
Defined in:
lib/resty/override_pry_help.rb

Constant Summary collapse

COMMANDS =
%w{method-command}

Instance Method Summary collapse

Instance Method Details

#help_text_for_commands(name, commands) ⇒ Object



13
14
15
# File 'lib/resty/override_pry_help.rb', line 13

def help_text_for_commands(name, commands)
  commands.first.banner
end

#visible_commandsObject



5
6
7
8
9
10
11
# File 'lib/resty/override_pry_help.rb', line 5

def visible_commands
  visible = {}
  commands.each do |key, command|
    visible[key] = command if COMMANDS.include?(command.options[:listing])
  end
  visible
end