Class: YARD::CodeObjects::RootObject

Inherits:
ModuleObject show all
Defined in:
lib/yard/code_objects/root_object.rb

Overview

Represents the root namespace object (the invisible Ruby module that holds all top level modules, class and other objects).

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from YARD::CodeObjects::NamespaceObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class YARD::CodeObjects::Base

Instance Method Details

#equal?(other) ⇒ Boolean

Returns:

  • (Boolean)
[View source]

9
10
11
# File 'lib/yard/code_objects/root_object.rb', line 9

def equal?(other)
  other == :root ? true : super(other)
end

#hashObject

[View source]

13
# File 'lib/yard/code_objects/root_object.rb', line 13

def hash; :root.hash end

#inspectObject

[View source]

7
# File 'lib/yard/code_objects/root_object.rb', line 7

def inspect; @inspect ||= "#<yardoc root>" end

#pathObject

[View source]

6
# File 'lib/yard/code_objects/root_object.rb', line 6

def path; @path ||= "" end

#root?Boolean

Returns:

  • (Boolean)
[View source]

8
# File 'lib/yard/code_objects/root_object.rb', line 8

def root?; true end