module Pry::CodeObject::Helpers
def c_method?
def c_method? real_method_object? && source_type == :c end
def c_module?
- Note: - If a module defined by C was extended with a lot of methods written
Returns:
-
(Boolean)
- `true` if this module was defined by means of the C API,
def c_module? return unless is_a?(WrappedModule) method_locations = wrapped.methods(false).map do |m| wrapped.method(m).source_location end method_locations.concat( wrapped.instance_methods(false).map do |m| wrapped.instance_method(m).source_location end ) c_methods = method_locations.grep(nil).count ruby_methods = method_locations.count - c_methods c_methods > ruby_methods end
def command?
def command? is_a?(Module) && self <= Pry::Command end
def module_with_yard_docs?
def module_with_yard_docs? is_a?(WrappedModule) && yard_docs? end
def real_method_object?
-
(Boolean)
-
def real_method_object? is_a?(::Method) || is_a?(::UnboundMethod) end