Module: Wee::CallbackMixin
- Included in:
- Brush::ActionInputTag, Brush::AnchorTag, Brush::FormTag, Brush::InputTag, Brush::RadioButtonTag, Brush::SelectListTag, Brush::TextAreaTag
- Defined in:
- lib/wee/html_brushes.rb
Overview
Callback Mixin
Instance Method Summary collapse
-
#call(*args) ⇒ Object
Is called when #callback_method was used.
- #callback(&block) ⇒ Object
- #callback_method(id, *args) ⇒ Object
Instance Method Details
#call(*args) ⇒ Object
Is called when #callback_method was used.
350 351 352 353 |
# File 'lib/wee/html_brushes.rb', line 350 def call(*args) args.push(*@callback_args) @callback_object.send(@callback_id, *args) end |
#callback(&block) ⇒ Object
341 342 343 344 345 |
# File 'lib/wee/html_brushes.rb', line 341 def callback(&block) @callback = block __callback() return self end |
#callback_method(id, *args) ⇒ Object
332 333 334 335 336 337 338 339 |
# File 'lib/wee/html_brushes.rb', line 332 def callback_method(id, *args) @callback = self @callback_object = @canvas.current_component @callback_id = id @callback_args = args __callback() return self end |