Class: RubyAi::Search::Vertex
- Inherits:
-
Object
- Object
- RubyAi::Search::Vertex
- Defined in:
- lib/ruby_ai/search/vertex.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:) ⇒ Vertex
constructor
A new instance of Vertex.
- #to_s ⇒ Object
Constructor Details
#initialize(name:) ⇒ Vertex
Returns a new instance of Vertex.
6 7 8 |
# File 'lib/ruby_ai/search/vertex.rb', line 6 def initialize(name:) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/ruby_ai/search/vertex.rb', line 4 def name @name end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 13 |
# File 'lib/ruby_ai/search/vertex.rb', line 10 def ==(other) self.class == other.class && @name == other.name end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/ruby_ai/search/vertex.rb', line 15 def to_s "vertex: #{name}" end |