module Pry::CodeObject::Helpers

Public Instance Methods

c_method?() click to toggle source
# File lib/pry/code_object.rb, line 10
def c_method?
  real_method_object? && source_type == :c
end
command?() click to toggle source
# File lib/pry/code_object.rb, line 18
def command?
  is_a?(Module) && self <= Pry::Command
end
module_with_yard_docs?() click to toggle source
# File lib/pry/code_object.rb, line 14
def module_with_yard_docs?
  is_a?(WrappedModule) && yard_docs?
end
real_method_object?() click to toggle source

we need this helper as some Pry::Method objects can wrap Procs @return [Boolean]

# File lib/pry/code_object.rb, line 6
def real_method_object?
  is_a?(::Method) || is_a?(::UnboundMethod)
end