summaryrefslogtreecommitdiffhomepage
path: root/test/key.rb
diff options
context:
space:
mode:
authorlstrzebinczyk <[email protected]>2017-05-27 20:56:35 +0200
committerTom Black <[email protected]>2017-06-03 20:30:43 -0400
commit3a694ffebcff71305d79c6e8c15246d671ce3888 (patch)
tree0c5ea151fa8ad76aa2e4feb447d6fe9efef1c409 /test/key.rb
parent65187cd5126227778146ec33c2857a391fbab620 (diff)
downloadruby2d-3a694ffebcff71305d79c6e8c15246d671ce3888.tar.gz
ruby2d-3a694ffebcff71305d79c6e8c15246d671ce3888.zip
Use named arguments (#65)
Diffstat (limited to 'test/key.rb')
-rw-r--r--test/key.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/key.rb b/test/key.rb
index 3c2c8e6..053fc29 100644
--- a/test/key.rb
+++ b/test/key.rb
@@ -2,8 +2,17 @@ require 'ruby2d'
set title: "Ruby 2D — Key", width: 300, height: 200
-s1 = Square.new(5, 5, 50, [1, 1, 1, 1])
-s2 = Square.new(60, 5, 50, [1, 1, 1, 1])
+s1 = Square.new(
+ x: 5,
+ y: 5,
+ size: 50
+)
+
+s2 = Square.new(
+ x: 60,
+ y: 5,
+ size: 50
+)
on :key do |event|
puts event