Class: SketchUpYARD::Stubs::AutoLoadGenerator::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/yard-sketchup/stubs/autoload.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Node

Returns a new instance of Node.



27
28
29
30
# File 'lib/yard-sketchup/stubs/autoload.rb', line 27

def initialize(object)
  @object = object
  @dependencies = SortedSet.new
end

Instance Attribute Details

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



25
26
27
# File 'lib/yard-sketchup/stubs/autoload.rb', line 25

def dependencies
  @dependencies
end

#objectObject (readonly)

Returns the value of attribute object.



24
25
26
# File 'lib/yard-sketchup/stubs/autoload.rb', line 24

def object
  @object
end

Instance Method Details

#<<(object) ⇒ Object



44
45
46
# File 'lib/yard-sketchup/stubs/autoload.rb', line 44

def <<(object)
  @dependencies << object
end

#<=>(other) ⇒ Object



48
49
50
# File 'lib/yard-sketchup/stubs/autoload.rb', line 48

def <=>(other)
  @object.path <=> other.path
end

#hashObject



52
53
54
# File 'lib/yard-sketchup/stubs/autoload.rb', line 52

def hash
  @object.path.hash
end

#namespaceObject



40
41
42
# File 'lib/yard-sketchup/stubs/autoload.rb', line 40

def namespace
  @object.namespace
end

#pathObject



36
37
38
# File 'lib/yard-sketchup/stubs/autoload.rb', line 36

def path
  @object.path
end

#root?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/yard-sketchup/stubs/autoload.rb', line 32

def root?
  @object.namespace.root?
end