Method: RETerm::Components::ButtonBox#initialize

Defined in:
lib/reterm/components/button_box.rb

#initialize(args = {}) ⇒ ButtonBox

Initialize the ButtonBox component

Parameters:

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

    button box params

Options Hash (args):

  • :widget (Component)

    component to include in the button box

  • :title (String)

    title to assign to button box

  • :buttons (String, Array<String>)

    string buttons to assign to dialog



20
21
22
23
24
25
26
27
# File 'lib/reterm/components/button_box.rb', line 20

def initialize(args={})
  super
  @widget  = args[:widget]
  @title   = args[:title] || ""
  @buttons = [args[:buttons]].flatten.compact

  @buttons = ["OK", "Cancel"] if @buttons.empty?
end