diff options
| author | lstrzebinczyk <[email protected]> | 2017-05-27 20:56:35 +0200 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-06-03 20:30:43 -0400 |
| commit | 3a694ffebcff71305d79c6e8c15246d671ce3888 (patch) | |
| tree | 0c5ea151fa8ad76aa2e4feb447d6fe9efef1c409 /test/contains.rb | |
| parent | 65187cd5126227778146ec33c2857a391fbab620 (diff) | |
| download | ruby2d-3a694ffebcff71305d79c6e8c15246d671ce3888.tar.gz ruby2d-3a694ffebcff71305d79c6e8c15246d671ce3888.zip | |
Use named arguments (#65)
Diffstat (limited to 'test/contains.rb')
| -rw-r--r-- | test/contains.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/contains.rb b/test/contains.rb index 5a11064..f3b3c15 100644 --- a/test/contains.rb +++ b/test/contains.rb @@ -11,13 +11,13 @@ else end objects = [] -objects.push Square.new(50, 50, 100) -objects.push Rectangle.new(200, 50, 100, 75) -objects.push Quad.new(350, 50, 500, 75, 450, 150, 375, 125) -objects.push Triangle.new(550, 50, 600, 125, 500, 150) -objects.push Line.new(225, 175, 375, 225, 20) -objects.push Image.new(50, 200, "#{media}/colors.png") -objects.push Text.new(450, 200, "Hello", 50, font) +objects.push Square.new(x: 50, y: 50, size: 100) +objects.push Rectangle.new(x: 200, y: 50, width: 100, height: 75) +objects.push Quad.new(x1: 350, y1: 50, x2: 500, y2: 75, x3: 450, y3: 150, x4: 375, y4: 125) +objects.push Triangle.new(x1: 550, y1: 50, x2: 600, y2: 125, x3: 500, y3: 150) +objects.push Line.new(x1: 225, y1: 175, x2: 375, y2: 225, width: 20) +objects.push Image.new(x: 50, y: 200, path: "#{media}/colors.png") +objects.push Text.new(x: 450, y: 200, text: "Hello", size: 50, font: font) on :key_down do |event| close if event.key == 'escape' |
