class Vizkit::ConnectorEvent

Public Class Methods

new(task,signature,options) click to toggle source
Calls superclass method Vizkit::ConnectorObject.new
# File lib/vizkit/connector_objects.rb, line 423
def initialize(task,signature,options)
    super()
    @supports_options = false
    @task = task
    @name = signature
    @task.validate_event @name.to_sym
end

Public Instance Methods

on_data(options,&block) click to toggle source
# File lib/vizkit/connector_objects.rb, line 437
def on_data(options,&block)
    Kernel.validate_options options
    @task.on_event @name.to_sym,&block
end
write(options,*args,&block) click to toggle source
# File lib/vizkit/connector_objects.rb, line 431
def write(options,*args,&block)
    @task.emit @name.to_sym,*args
    block.call if block
    nil
end