class Exiftool::Result
Attributes
display2sym[R]
raw[R]
sym2display[R]
to_display_hash[R]
to_hash[R]
Public Class Methods
new(raw_hash)
click to toggle source
# File lib/exiftool/result.rb, line 10 def initialize(raw_hash) @raw = {} @to_hash = {} @to_display_hash = {} @sym2display = {} raw_hash.each do |key, raw_value| p = FieldParser.new(key, raw_value) @raw[p.sym_key] = raw_value @to_hash[p.sym_key] = p.value @to_display_hash[p.display_key] = p.value @sym2display[p.sym_key] = p.display_key civil_date = p.civil_date if civil_date civil_date_key = "#{p.sym_key}_civil".to_sym @to_hash[civil_date_key] = civil_date end end @display2sym = @sym2display.invert end
Public Instance Methods
[](key)
click to toggle source
# File lib/exiftool/result.rb, line 31 def [](key) @to_hash[key] end
errors?()
click to toggle source
# File lib/exiftool/result.rb, line 39 def errors? self[:error] == 'Unknown file type' || self[:warning] == 'Unsupported file type' end
source_file()
click to toggle source
# File lib/exiftool/result.rb, line 35 def source_file self[:source_file] end