Class: Coordinates
- Inherits:
-
Object
- Object
- Coordinates
- Defined in:
- lib/software_challenge_client/coordinates.rb
Overview
Ein Koordinatenpaar für ein zweidimensionales Koordinatensystem.
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
X-Koordinate.
-
#y ⇒ Object
readonly
Y-Koordinate.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Coordinates
constructor
Erstellt ein neues Koordinatenpaar aus X- und Y-Koordinate.
Constructor Details
#initialize(x, y) ⇒ Coordinates
Erstellt ein neues Koordinatenpaar aus X- und Y-Koordinate.
13 14 15 16 |
# File 'lib/software_challenge_client/coordinates.rb', line 13 def initialize(x, y) @x = x @y = y end |
Instance Attribute Details
#x ⇒ Object (readonly)
X-Koordinate
8 9 10 |
# File 'lib/software_challenge_client/coordinates.rb', line 8 def x @x end |
#y ⇒ Object (readonly)
Y-Koordinate
10 11 12 |
# File 'lib/software_challenge_client/coordinates.rb', line 10 def y @y end |