Method: YARD::CodeObjects::Base#name

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

#name(prefix = false) ⇒ Symbol, String

The name of the object

Parameters:

  • prefix (Boolean) (defaults to: false)

    whether to show a prefix. Implement this in a subclass to define how the prefix is showed.

Returns:

  • (Symbol)

    if prefix is false, the symbolized name

  • (String)

    if prefix is true, prefix + the name as a String. This must be implemented by the subclass.



278
279
280
# File 'lib/yard/code_objects/base.rb', line 278

def name(prefix = false)
  prefix ? @name.to_s : (defined?(@name) && @name)
end