class Vizkit::ConnectorProc
Public Class Methods
new(task,proc_,options = Hash.new)
click to toggle source
Calls superclass method
Vizkit::ConnectorObject.new
# File lib/vizkit/connector_objects.rb, line 444 def initialize(task,proc_,options = Hash.new) super() @supports_options = false @task=task @proc = proc_ @name = "code block" end
Public Instance Methods
argument_types=(*value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 469 def argument_types=(*value) raise ArgumentError,"no siganture has the given arguments #{value}" unless argument_types?(*value) self end
argument_types?(*value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 461 def argument_types?(*value) if arity?(value.size) true else false end end
arity=(value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 452 def arity=(value) raise ArgumentError,"no siganture has an airty of #{value}" unless arity?(value) self end
arity?(value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 457 def arity?(value) @proc.arity == value end
write(options,*args,&block)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 474 def write(options,*args,&block) result = @proc.call(*args) block.call(result) if block result end
Also aliased as: read