Method: YARD::CodeObjects::Base#type

Defined in:
lib/yard/code_objects/base.rb

#typeSymbol

Default type is the lowercase class name without the “Object” suffix. Override this method to provide a custom object type

Returns:

  • (Symbol)

    the type of code object this represents



437
438
439
440
441
442
# File 'lib/yard/code_objects/base.rb', line 437

def type
  obj_name = self.class.name.split('::').last
  obj_name.gsub!(/Object$/, '')
  obj_name.downcase!
  obj_name.to_sym
end