Module: YARD::Templates::Helpers::FilterHelper
- Defined in:
- lib/yard/templates/helpers/filter_helper.rb
Overview
Helpers for various object types
Instance Method Summary collapse
-
#is_class?(object) ⇒ Boolean
Whether an object is a class.
-
#is_method?(object) ⇒ Boolean
Whether an object is a method.
-
#is_module?(object) ⇒ Boolean
Whether an object is a module.
-
#is_namespace?(object) ⇒ Boolean
Whether an object is a namespace.
Instance Method Details
#is_class?(object) ⇒ Boolean
Returns whether an object is a class.
16 17 18 |
# File 'lib/yard/templates/helpers/filter_helper.rb', line 16 def is_class?(object) object.is_a?(CodeObjects::ClassObject) end |
#is_method?(object) ⇒ Boolean
Returns whether an object is a method.
6 7 8 |
# File 'lib/yard/templates/helpers/filter_helper.rb', line 6 def is_method?(object) object.type == :method end |
#is_module?(object) ⇒ Boolean
Returns whether an object is a module.
21 22 23 |
# File 'lib/yard/templates/helpers/filter_helper.rb', line 21 def is_module?(object) object.is_a?(CodeObjects::ModuleObject) end |
#is_namespace?(object) ⇒ Boolean
Returns whether an object is a namespace.
11 12 13 |
# File 'lib/yard/templates/helpers/filter_helper.rb', line 11 def is_namespace?(object) object.is_a?(CodeObjects::NamespaceObject) end |