Module: Sweet::Application
- Included in:
- App
- Defined in:
- lib/sweet/base.rb,
lib/sweet/wx/application.rb,
lib/sweet/fox/application.rb,
lib/sweet/swt/application.rb,
lib/sweet/gtk2/application.rb,
lib/sweet/swing/application.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
180
181
182
|
# File 'lib/sweet/base.rb', line 180
def method_missing(name, *args, &block)
Sweet.create_widget(sweet_containers.last, name, *args, &block) || super
end
|
Instance Method Details
#busy(&block) ⇒ Object
177
178
179
|
# File 'lib/sweet/base.rb', line 177
def busy(&block)
raise 'busy is not implemented'
end
|
#initialize_app(root) ⇒ Object
162
163
164
165
|
# File 'lib/sweet/base.rb', line 162
def initialize_app(root)
sweet_containers << root
var_containers << root
end
|
TODO find suitable exception
173
174
175
|
# File 'lib/sweet/base.rb', line 173
def perform(&block)
raise 'perform is not implemented'
end
|
#sweet_containers ⇒ Object
166
167
168
|
# File 'lib/sweet/base.rb', line 166
def sweet_containers
@sweet_containers ||= []
end
|
#var_containers ⇒ Object
169
170
171
|
# File 'lib/sweet/base.rb', line 169
def var_containers
@var_containers ||= []
end
|