Class: Adhd::Connection
Instance Method Summary collapse
-
#initialize ⇒ Connection
constructor
def on_teardown(&block) # Set the handler to be called then a connection is dead block(self) # Run the teardown handler end.
- #is_closed? ⇒ Boolean
- #should_start? ⇒ Boolean
Constructor Details
#initialize ⇒ Connection
def on_teardown(&block)
# Set the handler to be called then a connection is dead
block(self) # Run the teardown handler
end
166 167 168 |
# File 'lib/adhd/reactor.rb', line 166 def initialize end |
Instance Method Details
#is_closed? ⇒ Boolean
174 175 176 |
# File 'lib/adhd/reactor.rb', line 174 def is_closed? (@status == "NOTRUNNING") end |
#should_start? ⇒ Boolean
170 171 172 |
# File 'lib/adhd/reactor.rb', line 170 def should_start? !(@status == "RUNNING") end |