class Pry::Command::Ls::SelfMethods

Public Class Methods

new(interrogatee, no_user_opts, opts, _pry_) click to toggle source
Calls superclass method Pry::Command::Ls::Formatter.new
# File lib/pry/commands/ls/self_methods.rb, line 10
def initialize(interrogatee, no_user_opts, opts, _pry_)
  super(_pry_)
  @interrogatee = interrogatee
  @no_user_opts = no_user_opts
end

Public Instance Methods

output_self() click to toggle source
# File lib/pry/commands/ls/self_methods.rb, line 16
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 Instance Methods

correct_opts?() click to toggle source
# File lib/pry/commands/ls/self_methods.rb, line 26
def correct_opts?
  @no_user_opts && interrogating_a_module?
end