Sha256: 0bce6b1ca2b1d6aab1c008e198dabbfc36418c53d9c43085b79229eac9f20770

Contents?: true

Size: 944 Bytes

Versions: 6908

Compression:

Stored size: 944 Bytes

Contents

# frozen_string_literal: true

class Pry
  class Command
    class Ls < Pry::ClassCommand
      class SelfMethods < Pry::Command::Ls::Formatter
        include Pry::Command::Ls::Interrogatable
        include Pry::Command::Ls::MethodsHelper

        def initialize(interrogatee, no_user_opts, opts, pry_instance)
          super(pry_instance)
          @interrogatee = interrogatee
          @no_user_opts = no_user_opts
          @ppp_switch = opts[:ppp]
          @jruby_switch = opts['all-java']
        end

        def output_self
          methods = all_methods(true).select do |m|
            m.owner == @interrogatee && grep.regexp[m.name]
          end
          heading = "#{Pry::WrappedModule.new(@interrogatee).method_prefix}methods"
          output_section(heading, format(methods))
        end

        private

        def correct_opts?
          @no_user_opts && interrogating_a_module?
        end
      end
    end
  end
end

Version data entries

6,908 entries across 6,903 versions & 33 rubygems

Version Path
ory-client-0.0.1.alpha40 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha39 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha38 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha37 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha36 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-kratos-client-0.8.2.alpha1 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha31 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.4.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.3.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.2.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.1.0 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha30 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha29 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.0.6 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha28 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.0.5 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha27 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
ory-client-0.0.1.alpha24 vendor/bundle/ruby/2.5.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.0.4 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb
primary_connect_proto-0.0.3 vendor/bundle/ruby/2.6.0/gems/pry-0.13.1/lib/pry/commands/ls/self_methods.rb