Method: Shoes::Link#initialize
- Defined in:
- lacci/lib/shoes/drawables/link.rb
#initialize(*args, **kwargs, &block) ⇒ Link
Empty by the time it reaches Drawable#initialize
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lacci/lib/shoes/drawables/link.rb', line 11 def initialize(*args, **kwargs, &block) @block = block # We can't send a block to the display drawable, but we can send a boolean @has_block = !block.nil? super bind_self_event("click") do @block&.call end end |