Class: Hasu::Window

Inherits:
Gosu::Window
  • Object
show all
Defined in:
lib/hasu/window.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWindow

Returns a new instance of Window.



16
17
18
19
# File 'lib/hasu/window.rb', line 16

def initialize(*)
  super
  reset  unless Hasu.error
end

Class Method Details

.inherited(other) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/hasu/window.rb', line 6

def self.inherited(other)
  includer = caller.first.split(":").first
  Hasu.reloads[includer] = File.mtime(includer)
  if other.respond_to?(:prepend, true)
    other.send(:prepend, Hasu::Guard)
  else
    warn "Most of Hasu's nifty features (e.g. error catching, file reloading) are only available on Ruby >= 2.0."
  end
end

.run(*args) ⇒ Object



21
22
23
24
25
26
# File 'lib/hasu/window.rb', line 21

def self.run(*args)
  unless @running
    @running = true
    new(*args).show
  end
end