Module: Smalruby
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/smalruby.rb,
lib/smalruby/color.rb,
lib/smalruby/world.rb,
lib/smalruby/canvas.rb,
lib/smalruby/console.rb,
lib/smalruby/version.rb,
lib/smalruby/character.rb,
lib/smalruby/event_handler.rb
Defined Under Namespace
Modules: Color
Classes: Canvas, Character, Console, EventHandler, World
Constant Summary
collapse
- VERSION =
'0.0.6'
Class Method Summary
collapse
Class Method Details
.await ⇒ Object
41
42
43
44
45
|
# File 'lib/smalruby.rb', line 41
def await
@draw_mutex.synchronize do
@draw_cv.wait(@draw_mutex)
end
end
|
.start ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/smalruby.rb', line 21
def start
@started = true
begin
if world.objects.any? { |o| /console/i !~ o.class.name }
start_window_application
else
start_console_application
end
rescue SystemExit
end
end
|
.started? ⇒ Boolean
33
34
35
|
# File 'lib/smalruby.rb', line 33
def started?
return @started
end
|
.world ⇒ Object
37
38
39
|
# File 'lib/smalruby.rb', line 37
def world
return World.instance
end
|