File Manager

Path: /opt/chef.upgrade/embedded/lib/ruby/gems/2.3.0/gems/byebug-9.0.6/lib/byebug/helpers/

Viewing File: reflection.rb

module Byebug
  module Helpers
    #
    # Reflection utilitie
    #
    module ReflectionHelper
      #
      # List of "command" classes in the including module
      #
      def commands
        constants(false)
          .map { |const| const_get(const, false) }
          .select { |c| c.is_a?(Class) && c.name =~ /[a-z]Command$/ }
      end
    end
  end
end