Class: Neo4jBolt::State

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

Instance Method Summary collapse

Constructor Details

#initializeState

Returns a new instance of State.



67
68
69
70
# File 'lib/neo4j_bolt.rb', line 67

def initialize()
    @state = nil
    self.set(ServerState::DISCONNECTED)
end

Instance Method Details

#==(other) ⇒ Object



77
78
79
# File 'lib/neo4j_bolt.rb', line 77

def ==(other)
    @state == other
end

#set(state) ⇒ Object



72
73
74
75
# File 'lib/neo4j_bolt.rb', line 72

def set(state)
    @state = state
    # STDERR.puts " > #{SERVER_STATE_LABELS[@state]}"
end

#to_iObject



81
82
83
# File 'lib/neo4j_bolt.rb', line 81

def to_i
    @state
end