Module: Pry::CodeObject::Helpers
- Included in:
- Pry::Command, Method, WrappedModule, WrappedModule::Candidate
- Defined in:
- lib/pry/code_object.rb
Instance Method Summary collapse
- #c_method? ⇒ Boolean
- #command? ⇒ Boolean
- #module_with_yard_docs? ⇒ Boolean
-
#real_method_object? ⇒ Boolean
we need this helper as some Pry::Method objects can wrap Procs.
Instance Method Details
#c_method? ⇒ Boolean
29 30 31 |
# File 'lib/pry/code_object.rb', line 29 def c_method? real_method_object? && source_type == :c end |
#command? ⇒ Boolean
37 38 39 |
# File 'lib/pry/code_object.rb', line 37 def command? is_a?(Module) && self <= Pry::Command end |
#module_with_yard_docs? ⇒ Boolean
33 34 35 |
# File 'lib/pry/code_object.rb', line 33 def module_with_yard_docs? is_a?(WrappedModule) && yard_docs? end |
#real_method_object? ⇒ Boolean
we need this helper as some Pry::Method objects can wrap Procs
25 26 27 |
# File 'lib/pry/code_object.rb', line 25 def real_method_object? is_a?(::Method) || is_a?(::UnboundMethod) end |