Class: SimpleMetric::DataPoint
- Inherits:
-
Object
- Object
- SimpleMetric::DataPoint
- Defined in:
- lib/simple_metric.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ DataPoint
constructor
A new instance of DataPoint.
Constructor Details
#initialize(x, y) ⇒ DataPoint
Returns a new instance of DataPoint.
76 77 78 |
# File 'lib/simple_metric.rb', line 76 def initialize(x, y) @x, @y = x.to_f, y.to_f end |
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x.
74 75 76 |
# File 'lib/simple_metric.rb', line 74 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
74 75 76 |
# File 'lib/simple_metric.rb', line 74 def y @y end |