Class: Neo4j::Core::RelationshipSetEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4j-core/relationship_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nodeid, relationship_type) ⇒ RelationshipSetEntry

Returns a new instance of RelationshipSetEntry.



44
45
46
# File 'lib/neo4j-core/relationship_set.rb', line 44

def initialize(nodeid, relationship_type)
  @nodeid, @relationship_type = nodeid.to_s, relationship_type.to_s
end

Instance Attribute Details

#nodeidObject

Returns the value of attribute nodeid.



42
43
44
# File 'lib/neo4j-core/relationship_set.rb', line 42

def nodeid
  @nodeid
end

#relationship_typeObject

Returns the value of attribute relationship_type.



42
43
44
# File 'lib/neo4j-core/relationship_set.rb', line 42

def relationship_type
  @relationship_type
end

Instance Method Details

#==(o) ⇒ Object



48
49
50
# File 'lib/neo4j-core/relationship_set.rb', line 48

def ==(o)
  eql?(o)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/neo4j-core/relationship_set.rb', line 52

def eql?(other)
  @nodeid == other.nodeid && @relationship_type == other.relationship_type
end

#hashObject



56
57
58
# File 'lib/neo4j-core/relationship_set.rb', line 56

def hash
  3 * @nodeid.hash + @relationship_type.hash
end