lib/halation/roll.rb in halation-0.2.1 vs lib/halation/roll.rb in halation-0.3.0
- old
+ new
@@ -7,12 +7,16 @@
class Roll
# Artist for the roll of film.
attr_reader :artist
# Copyright for the roll of film.
attr_reader :copyright
- # Default date for all frames in ISO 8601 format (optional).
- attr_reader :date
+ # Default date a frame was captured for all frames,
+ # in ISO 8601 format (optional).
+ attr_reader :date_captured
+ # Default date a frame was scanned (digitized) for all frames,
+ # in ISO 8601 format (optional).
+ attr_reader :date_scanned
# Tag of the cameara used.
attr_reader :camera
# Tag of the default lens used (optional).
attr_reader :lens
# ISO of the roll of film.
@@ -26,11 +30,12 @@
# Reset the configuration to default values.
def reset
@artist = nil
@copyright = nil
- @date = nil
+ @date_captured = nil
+ @date_scanned = nil
@camera = nil
@lens = nil
@iso = nil
@frames = []
end
@@ -40,10 +45,11 @@
reset
YAML.load_file(file_path).tap do |roll|
@artist = Coerce.string(roll["artist"])
@copyright = Coerce.string(roll["copyright"])
- @date = Coerce.date(roll["date"])
+ @date_captured = Coerce.date(roll["date_captured"])
+ @date_scanned = Coerce.date(roll["date_scanned"])
@camera = Coerce.string(roll["camera"])
@lens = Coerce.string(roll["lens"])
@iso = Coerce.integer(roll["iso"])
(roll["frames"] || []).each do |frame|