Class: Exif::Tag::MakerNote::Focus

Inherits:
Base
  • Object
show all
Defined in:
lib/exifparser/makernote/nikon.rb

Overview

0x0008 - Focus

Instance Attribute Summary

Attributes inherited from Base

#IFD, #count, #data, #dataPos, #pos, #tagID

Instance Method Summary collapse

Methods inherited from Base

#formatExposureTime, #formatFNumber, #formatFocalLength, #formatLatLon, #initialize, #inspect, #name, #processData, #value

Constructor Details

This class inherits a constructor from Exif::Tag::Base

Instance Method Details

#to_sObject



154
155
156
157
158
# File 'lib/exifparser/makernote/nikon.rb', line 154

def to_s
  n = @formatted.numerator
  d = @formatted.denominator
  (n == 1 && d == 0) ? 'Pan Focus' : "#{n}/#{d}"
end