module YARD::Templates::Helpers::FilterHelper

Helpers for various object types

Public Instance Methods

is_class?(object) click to toggle source

@return [Boolean] whether an object is a class

# File lib/yard/templates/helpers/filter_helper.rb, line 17
def is_class?(object)
  object.is_a?(CodeObjects::ClassObject)
end
is_method?(object) click to toggle source

@return [Boolean] whether an object is a method

# File lib/yard/templates/helpers/filter_helper.rb, line 7
def is_method?(object)
  object.type == :method
end
is_module?(object) click to toggle source

@return [Boolean] whether an object is a module

# File lib/yard/templates/helpers/filter_helper.rb, line 22
def is_module?(object)
  object.is_a?(CodeObjects::ModuleObject)
end
is_namespace?(object) click to toggle source

@return [Boolean] whether an object is a namespace

# File lib/yard/templates/helpers/filter_helper.rb, line 12
def is_namespace?(object)
  object.is_a?(CodeObjects::NamespaceObject)
end