Class: Wx::App

Inherits:
Object show all
Includes:
Slapp::Sugar
Defined in:
lib/slapp.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Slapp::Sugar

#button, #elements, #frame

Class Method Details

.app(&block) ⇒ Object



52
53
54
55
56
57
# File 'lib/slapp.rb', line 52

def self.app &block
  if block_given?
  then @on_init_proc = block
  else @on_init_proc
  end
end

Instance Method Details

#on_initObject



49
50
51
# File 'lib/slapp.rb', line 49

def on_init
  self.instance_eval &self.class.app
end

#runObject



58
59
60
# File 'lib/slapp.rb', line 58

def run
  new.main_loop
end