Class: DistanceMeasurement
- Inherits:
-
Object
- Object
- DistanceMeasurement
- Defined in:
- lib/dm-geokit/support/distance_measurement.rb
Instance Attribute Summary collapse
-
#measurement ⇒ Object
Returns the value of attribute measurement.
Instance Method Summary collapse
-
#initialize(value, measurement) ⇒ DistanceMeasurement
constructor
A new instance of DistanceMeasurement.
- #to_f ⇒ Object
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value, measurement) ⇒ DistanceMeasurement
Returns a new instance of DistanceMeasurement.
3 4 5 6 |
# File 'lib/dm-geokit/support/distance_measurement.rb', line 3 def initialize(value,measurement) @value = value.to_f @measurement = measurement end |
Instance Attribute Details
#measurement ⇒ Object
Returns the value of attribute measurement.
2 3 4 |
# File 'lib/dm-geokit/support/distance_measurement.rb', line 2 def measurement @measurement end |
Instance Method Details
#to_f ⇒ Object
13 14 15 |
# File 'lib/dm-geokit/support/distance_measurement.rb', line 13 def to_f @value.to_f end |
#to_i ⇒ Object
10 11 12 |
# File 'lib/dm-geokit/support/distance_measurement.rb', line 10 def to_i @value.to_i end |
#to_s ⇒ Object
7 8 9 |
# File 'lib/dm-geokit/support/distance_measurement.rb', line 7 def to_s @value.to_s end |