Class: SimpleMetric::DataPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_metric.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#xObject (readonly)

Returns the value of attribute x.



74
75
76
# File 'lib/simple_metric.rb', line 74

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



74
75
76
# File 'lib/simple_metric.rb', line 74

def y
  @y
end