Class: Ecco::EventListener

Inherits:
Object
  • Object
show all
Includes:
comcom.githubcom.github.shyikocom.github.shyiko.mysqlcom.github.shyiko.mysql.binlogcom.github.shyiko.mysql.binlog.BinaryLogClientcom.github.shyiko.mysql.binlog.BinaryLogClient::EventListener
Defined in:
lib/ecco/event_listener.rb

Direct Known Subclasses

RowEventListener, SaveEventListener

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ EventListener

Returns a new instance of EventListener.



8
9
10
11
# File 'lib/ecco/event_listener.rb', line 8

def initialize(client)
  @client = client
  @callback = Proc.new {}
end

Instance Attribute Details

#callback=(value) ⇒ Object (writeonly)

Sets the attribute callback

Parameters:

  • value

    the value to set the attribute callback to.



6
7
8
# File 'lib/ecco/event_listener.rb', line 6

def callback=(value)
  @callback = value
end

Instance Method Details

#on_event(event) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/ecco/event_listener.rb', line 13

def on_event(event)
  raise NotImplementedError
end