summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorTom Black <[email protected]>2017-02-17 00:53:59 -0500
committerTom Black <[email protected]>2017-02-17 00:53:59 -0500
commitd426b3c21269df23cfbc4dd634c35d5d487aa090 (patch)
tree9e317889f5647c36bc75637cb1e8d40184961370 /lib
parente11976895af419e7411ae1d326779ff04909b6ca (diff)
downloadruby2d-d426b3c21269df23cfbc4dd634c35d5d487aa090.tar.gz
ruby2d-d426b3c21269df23cfbc4dd634c35d5d487aa090.zip
Minor cleanup
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/application.rb1
-rw-r--r--lib/ruby2d/dsl.rb1
-rw-r--r--lib/ruby2d/image.rb9
-rw-r--r--lib/ruby2d/text.rb2
4 files changed, 7 insertions, 6 deletions
diff --git a/lib/ruby2d/application.rb b/lib/ruby2d/application.rb
index c6924b1..8de526d 100644
--- a/lib/ruby2d/application.rb
+++ b/lib/ruby2d/application.rb
@@ -12,7 +12,6 @@ module Ruby2D::Application
@@window.set(opts)
end
- # def on(mouse: nil, key: nil, key_up: nil, key_down: nil, controller: nil, &proc)
def on(args = {}, &proc)
@@window.on(args, &proc)
end
diff --git a/lib/ruby2d/dsl.rb b/lib/ruby2d/dsl.rb
index 20d088e..910c100 100644
--- a/lib/ruby2d/dsl.rb
+++ b/lib/ruby2d/dsl.rb
@@ -9,7 +9,6 @@ module Ruby2D::DSL
Application.set(opts)
end
- # def on(mouse: nil, key: nil, key_up: nil, key_down: nil, controller: nil, &proc)
def on(args = {}, &proc)
Application.on(args, &proc)
end
diff --git a/lib/ruby2d/image.rb b/lib/ruby2d/image.rb
index cf5e00e..40e3878 100644
--- a/lib/ruby2d/image.rb
+++ b/lib/ruby2d/image.rb
@@ -8,9 +8,12 @@ module Ruby2D
def initialize(x, y, path)
- # unless File.exists? path
- # raise Error, "Cannot find image file `#{path}`"
- # end
+ # TODO: Check if file exists
+ # `File.exists?` is not available in MRuby
+ # Ideally would do:
+ # unless File.exists? path
+ # raise Error, "Cannot find image file `#{path}`"
+ # end
@type_id = 3
@x, @y, @path = x, y, path
diff --git a/lib/ruby2d/text.rb b/lib/ruby2d/text.rb
index 06128cf..2bf890c 100644
--- a/lib/ruby2d/text.rb
+++ b/lib/ruby2d/text.rb
@@ -46,7 +46,7 @@ module Ruby2D
def resolve_path(font)
if RUBY_PLATFORM =~ /darwin/
font_path = "/Library/Fonts/#{font}.ttf"
- else
+ else
# Linux
font_path = "/usr/share/fonts/truetype/#{font}.ttf"
end