Class: Neo4jBolt::State
- Inherits:
-
Object
- Object
- Neo4jBolt::State
- Defined in:
- lib/neo4j_bolt.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize ⇒ State
constructor
A new instance of State.
- #set(state) ⇒ Object
- #to_i ⇒ Object
Constructor Details
#initialize ⇒ State
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_i ⇒ Object
81 82 83 |
# File 'lib/neo4j_bolt.rb', line 81 def to_i @state end |