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.
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 |