Class: EXIFR::TIFF::Degrees

Inherits:
Array
  • Object
show all
Defined in:
lib/exifr/tiff.rb

Instance Method Summary collapse

Constructor Details

#initialize(arr) ⇒ Degrees

Returns a new instance of Degrees.



329
330
331
332
# File 'lib/exifr/tiff.rb', line 329

def initialize(arr)
  raise "expected [degrees, minutes, seconds]" unless arr.length == 3
  super
end

Instance Method Details

#to_fObject



334
335
336
# File 'lib/exifr/tiff.rb', line 334

def to_f
  reduce { |m,v| m * 60 + v}.to_f / 3600
end