Class: Point
- Inherits:
-
Object
- Object
- Point
- Defined in:
- lib/zadt/AbstractDataTypes/Geometrics/point.rb
Instance Attribute Summary collapse
-
#coords ⇒ Object
readonly
Returns the value of attribute coords.
-
#dims ⇒ Object
readonly
Returns the value of attribute dims.
Instance Method Summary collapse
-
#initialize(coordinates) ⇒ Point
constructor
A new instance of Point.
Constructor Details
#initialize(coordinates) ⇒ Point
Returns a new instance of Point.
3 4 5 6 |
# File 'lib/zadt/AbstractDataTypes/Geometrics/point.rb', line 3 def initialize(coordinates) @coords = coordinates @dims = @coords.length end |
Instance Attribute Details
#coords ⇒ Object (readonly)
Returns the value of attribute coords.
2 3 4 |
# File 'lib/zadt/AbstractDataTypes/Geometrics/point.rb', line 2 def coords @coords end |
#dims ⇒ Object (readonly)
Returns the value of attribute dims.
2 3 4 |
# File 'lib/zadt/AbstractDataTypes/Geometrics/point.rb', line 2 def dims @dims end |