Class: Architect::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/architect/node.rb

Overview

Generic class to create a graph node

Direct Known Subclasses

Class, Note

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Node

Returns a new instance of Node.



8
9
10
# File 'lib/architect/node.rb', line 8

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/architect/node.rb', line 6

def name
  @name
end

Instance Method Details

#==(node) ⇒ Object



12
13
14
# File 'lib/architect/node.rb', line 12

def == (node)
  node && (@name == node.name)
end