Sha256: f7fb87a0d8464d4806bb21c7b7a78daf95e5b64739e0861a8c4497b1dcb41605

Contents?: true

Size: 395 Bytes

Versions: 6506

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

6,506 entries across 6,502 versions & 34 rubygems

Version Path
jets-0.5.3 vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/reflection.rb
jets-0.5.2 vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/reflection.rb
jets-0.5.1 vendor/lambdagem/bundled/gems/ruby/2.5.0/gems/byebug-10.0.0/lib/byebug/helpers/reflection.rb
byebug-10.0.2 lib/byebug/helpers/reflection.rb
byebug-10.0.1 lib/byebug/helpers/reflection.rb
byebug-10.0.0 lib/byebug/helpers/reflection.rb