Module: Byebug::Helpers::ReflectionHelper

Included in:
Subcommands::ClassMethods
Defined in:
lib/byebug/helpers/reflection.rb

Overview

Reflection utilitie

Instance Method Summary collapse

Instance Method Details

#commandsObject

List of “command” classes in the including module



10
11
12
13
14
# File 'lib/byebug/helpers/reflection.rb', line 10

def commands
  constants(false)
    .map { |const| const_get(const, false) }
    .select { |c| c.is_a?(Class) && c.name =~ /[a-z]Command$/ }
end