Sha256: 4ee86c7e20f28d96de1ec53fd9fc02831470874442be45fc95a9bb3963b95fc7

Contents?: true

Size: 924 Bytes

Versions: 24

Compression:

Stored size: 924 Bytes

Contents

require 'pry/commands/ls/interrogatable'
require 'pry/commands/ls/methods_helper'

class Pry
  class Command::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_)
        super(_pry_)
        @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

Version data entries

24 entries across 24 versions & 8 rubygems

Version Path
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
xaiml-0.1.3 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
xaiml-0.1.2 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
xaiml-0.1.1 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
xaiml-0.1.0 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
monero_wallet_gen-0.1.0 vendor/bundle/ruby/2.3.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
sb_prime_table-0.1.1 vendor/bundle/ruby/2.4.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
sb_prime_table-0.1.0 vendor/bundle/ruby/2.4.0/gems/pry-0.11.3/lib/pry/commands/ls/self_methods.rb
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.2/lib/pry/commands/ls/self_methods.rb
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.2/lib/pry/commands/ls/self_methods.rb
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/pry-0.11.2/lib/pry/commands/ls/self_methods.rb
pry-0.11.3 lib/pry/commands/ls/self_methods.rb
pry-0.11.3-java lib/pry/commands/ls/self_methods.rb
pry-0.11.2 lib/pry/commands/ls/self_methods.rb
pry-0.11.2-java lib/pry/commands/ls/self_methods.rb
tdiary-5.0.6 vendor/bundle/gems/pry-0.11.0/lib/pry/commands/ls/self_methods.rb
pry-0.11.1 lib/pry/commands/ls/self_methods.rb
pry-0.11.1-java lib/pry/commands/ls/self_methods.rb
pry-0.11.0 lib/pry/commands/ls/self_methods.rb
pry-0.11.0-java lib/pry/commands/ls/self_methods.rb