class HelloButton

Public Class Methods

new() click to toggle source
# File samples/hello/hello_button2.rb, line 14
def initialize
  @counter = Counter.new
end

Public Instance Methods

launch() click to toggle source
# File samples/hello/hello_button2.rb, line 18
def launch
  window {
    title 'Hello, Button!'
    
    @button = button('Click To Increment: 0') {
      on_action do
        @counter.count += 1
        @button.text = "Click To Increment: #{new_count}"
      end
    }
  }
end