Class: Shul::App
- Inherits:
-
Object
- Object
- Shul::App
- Defined in:
- lib/shul.rb
Instance Method Summary collapse
-
#initialize(shoes_app, doc, refresh: false, attributes: {}) ⇒ App
constructor
A new instance of App.
- #reload ⇒ Object
Constructor Details
#initialize(shoes_app, doc, refresh: false, attributes: {}) ⇒ App
Returns a new instance of App.
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/shul.rb', line 342 def initialize(shoes_app, doc, refresh: false, attributes: {}) # To find out the window dimensions we must first render the app shul = Window.new(shoes_app, doc) if refresh then h = attributes shoes_app.start do |app| sleep 0.0001 box = doc.root.element('hbox | vbox') ht, wh = find_max_dimensions(box) h[:width],h[:height] = ht, wh win = window(h) { Window.new self, doc } app.close # closes the initial shoes app shul = nil end end doc.callback = shul end |
Instance Method Details
#reload ⇒ Object
373 374 375 376 |
# File 'lib/shul.rb', line 373 def reload() #alert 'hello world' '@shoes.inspect' end |