Class: Shul::App

Inherits:
Object
  • Object
show all
Defined in:
lib/shul.rb

Instance Method Summary collapse

Constructor Details

#initialize(shoes_app, doc, refresh: false, attributes: {}) ⇒ App

Returns a new instance of App.



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/shul.rb', line 206

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
  
end

Instance Method Details

#reloadObject



235
236
237
238
# File 'lib/shul.rb', line 235

def reload()
  #alert 'hello world'
  '@shoes.inspect'
end