Module: Wee::CallbackMixin

Overview


Callback Mixin


Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object

Is called when #callback_method was used.



303
304
305
306
# File 'lib/wee/html_brushes.rb', line 303

def call(*args)
  args.push(*@callback_args)
  @callback_object.send(@callback_id, *args)
end

#callback(&block) ⇒ Object



294
295
296
297
298
# File 'lib/wee/html_brushes.rb', line 294

def callback(&block)
  @callback = block
  __callback()
  return self
end

#callback_method(id, *args) ⇒ Object



285
286
287
288
289
290
291
292
# File 'lib/wee/html_brushes.rb', line 285

def callback_method(id, *args)
  @callback = self
  @callback_object = @canvas.current_component 
  @callback_id = id
  @callback_args = args
  __callback()
  return self
end