Bring in the class methods when included.
@example Extend the class methods.
Connectable.included(class)
@param [ Class ] klass The class including the module.
@since 1.3.0
# File lib/moped/sockets/connectable.rb, line 33 def self.included(klass) klass.send(:extend, ClassMethods) end
Is the socket connection alive?
@example Is the socket alive?
socket.alive?
@return [ true, false ] If the socket is alive.
@since 1.0.0
# File lib/moped/sockets/connectable.rb, line 15 def alive? if Kernel::select([ self ], nil, [ self ], 0) !eof? rescue false else true end rescue IOError false end
Generated with the Darkfish Rdoc Generator 2.