Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.244 kB
class SlickButton
attr_accessor :command
def initialize(&block)
@command = block
end
def on_button_push
@command.call if @command
end
end
new_button = SlickButton.new do
puts 'The button was pushed'
end
new_button.on_button_push
Jump to Line
Something went wrong with that request. Please try again.