Class: DistanceMeasurement

Inherits:
Object
  • Object
show all
Defined in:
lib/dm-geokit/support/distance_measurement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#measurementObject

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_fObject



13
14
15
# File 'lib/dm-geokit/support/distance_measurement.rb', line 13

def to_f
  @value.to_f
end

#to_iObject



10
11
12
# File 'lib/dm-geokit/support/distance_measurement.rb', line 10

def to_i
  @value.to_i
end

#to_sObject



7
8
9
# File 'lib/dm-geokit/support/distance_measurement.rb', line 7

def to_s
  @value.to_s
end