Method: Shoes::DSL::Element#button

Defined in:
shoes-core/lib/shoes/dsl/element.rb

#button(text = nil, opts = {}, &blk) ⇒ Shoes::Button

Creates a clickable button.

Parameters:

  • text (String) (defaults to: nil)

    text to display on the button

  • blk (Proc)

    code to run when the button is clicked

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • text (String)

    text to display on the button

  • click (Proc)

    code to run when the button is clicked

Returns:



125
126
127
# File 'shoes-core/lib/shoes/dsl/element.rb', line 125

def button(text = nil, opts = {}, &blk)
  create Shoes::Button, text, opts, blk
end