module EmmyExtends::Mysql2::Watcher
Attributes
client[RW]
operation[RW]
Public Class Methods
new(client, operation)
click to toggle source
# File lib/emmy_extends/mysql2/watcher.rb, line 6 def initialize(client, operation) @client = client @operation = operation end
Public Instance Methods
notify_readable()
click to toggle source
# File lib/emmy_extends/mysql2/watcher.rb, line 11 def notify_readable detach begin result = @client.async_result rescue Exception => e @operation.error!(e.to_s, @operation, self) else @operation.success!(result, @operation, self) end end