module Pry::Command::Ls::Interrogatable

Private Instance Methods

interrogatee_mod() click to toggle source
# File lib/pry/commands/ls/interrogatable.rb, line 13
def interrogatee_mod
  if interrogating_a_module?
    @interrogatee
  else
    singleton = Pry::Method.singleton_class_of(@interrogatee)
    singleton.ancestors.grep(::Class).reject { |c| c == singleton }.first
  end
end
interrogating_a_module?() click to toggle source
# File lib/pry/commands/ls/interrogatable.rb, line 9
def interrogating_a_module?
  Module === @interrogatee # rubocop:disable Style/CaseEquality
end