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



12
13
14
15
16
# File 'lib/byebug/helpers/reflection.rb', line 12

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