vendor/bundle/ruby/2.3.0/gems/sqreen-1.10.5/lib/sqreen/performance_notifications.rb
# Subsribe to receive notificiations about an event
# returns a subscription indentitifcation
Subsribe to receive notificiations about an event
returns a subscription indentitifcation
Subsribe to receive notificiations about an event returns a subscription indentitifcation
def subscribe(pattern = nil, &block)
        id = (@subscription_id += 1)
        case pattern
        when NilClass
          @subscriptions_all[id] = block
        when Regexp
          @subscriptions_regexp[id] = [pattern, block]
        else
          @subscriptions_val[pattern].push([id, block])
        end
        id
      end
def subscribe ( pattern = nil , & block ) id = ( @subscription_id += 1 ) case pattern when NilClass @subscriptions_all [ id ] = block when Regexp @subscriptions_regexp [ id ] = [ pattern , block ] else @subscriptions_val [ pattern ] . push ( [ id , block ] ) end id end
Subsribe to receive notificiations about an event
returns a subscription indentitifcation
Subsribe to receive notificiations about an event returns a subscription indentitifcation
pattern
<not_specific>
block
<not_specific>