Class: Picasa::Presenter::Exif

Inherits:
Base
  • Object
show all
Defined in:
lib/picasa/presenter/exif.rb

Instance Attribute Summary

Attributes inherited from Base

#parsed_body

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect

Methods included from Utils

array_wrap, inline_query, map_to_boolean, map_to_date, map_to_float, map_to_integer, retrieve, safe_retrieve

Constructor Details

This class inherits a constructor from Picasa::Presenter::Base

Instance Method Details

#exposureFloat


23
24
25
# File 'lib/picasa/presenter/exif.rb', line 23

def exposure
  @exposure ||= map_to_float(safe_retrieve(parsed_body, "exif$exposure"))
end

#flashBoolean


28
29
30
# File 'lib/picasa/presenter/exif.rb', line 28

def flash
  @flash ||= map_to_boolean(safe_retrieve(parsed_body, "exif$flash"))
end

#focal_lengthFloat


33
34
35
# File 'lib/picasa/presenter/exif.rb', line 33

def focal_length
  @focal_length ||= map_to_float(safe_retrieve(parsed_body, "exif$focallength"))
end

#fstopFloat


8
9
10
# File 'lib/picasa/presenter/exif.rb', line 8

def fstop
  @fstop ||= map_to_float(safe_retrieve(parsed_body, "exif$fstop"))
end

#image_unique_idString


52
53
54
# File 'lib/picasa/presenter/exif.rb', line 52

def image_unique_id
  @image_unique_id ||= safe_retrieve(parsed_body, "exif$imageUniqueID")
end

#isoInteger


38
39
40
# File 'lib/picasa/presenter/exif.rb', line 38

def iso
  @iso ||= map_to_integer(safe_retrieve(parsed_body, "exif$iso"))
end

#makeString


13
14
15
# File 'lib/picasa/presenter/exif.rb', line 13

def make
  @make ||= safe_retrieve(parsed_body, "exif$make")
end

#modelString


18
19
20
# File 'lib/picasa/presenter/exif.rb', line 18

def model
  @model ||= safe_retrieve(parsed_body, "exif$model")
end

#timeDateTime


43
44
45
46
47
48
49
# File 'lib/picasa/presenter/exif.rb', line 43

def time
  @time ||= begin
    if value = safe_retrieve(parsed_body, "exif$time")
      DateTime.strptime((value.to_f / 1000).round.to_s, '%s')
    end
  end
end