Class: EXIFR::TIFF::Degrees

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

Instance Method Summary (collapse)

Constructor Details

- (Degrees) initialize(arr)

Returns a new instance of Degrees

Raises:



304
305
306
307
# File 'lib/exifr/tiff.rb', line 304

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

Instance Method Details

- (Object) to_f



309
310
311
# File 'lib/exifr/tiff.rb', line 309

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