class Difference
Attributes
temperature[R]
value[R]
Public Class Methods
new(temperature,value)
click to toggle source
Constructor that it passes by parameter two values that we want to compare
# File lib/difference.rb, line 5 def initialize (temperature,value) @temperature=temperature @value=value end
Public Instance Methods
get()
click to toggle source
Method to obtain the difference between two values that we obtain in the constructor
# File lib/difference.rb, line 10 def get difference= temperature.to_f - value.to_f return difference.to_f end