Class: Halation::Roll::Frame
- Inherits:
-
Object
- Object
- Halation::Roll::Frame
- Defined in:
- lib/halation/roll/frame.rb
Overview
A frame on the roll of film.
Instance Attribute Summary collapse
-
#aperture ⇒ Object
readonly
F-number of the aperture setting.
-
#date_captured ⇒ Object
readonly
Date the frame was captured, in ISO 8601 format.
-
#date_scanned ⇒ Object
readonly
Date the frame was scanned (digitized), in ISO 8601 format.
-
#flash ⇒ Object
readonly
True if flash was fired.
-
#focal_length ⇒ Object
readonly
Focal length of the lens, if not specified by the lens profile (a zoom lens).
-
#lens ⇒ Object
readonly
Tag of the lens used.
-
#number ⇒ Object
readonly
Frame number.
-
#orientation ⇒ Object
readonly
1 = Horizontal (normal) 2 = Mirror horizontal 3 = Rotate 180 4 = Mirror vertical 5 = Mirror horizontal and rotate 270 CW 6 = Rotate 90 CW 7 = Mirror horizontal and rotate 90 CW 8 = Rotate 270 CW.
-
#shutter ⇒ Object
readonly
Shutter speed.
Instance Method Summary collapse
-
#initialize(yaml) ⇒ Frame
constructor
A new instance of Frame.
Constructor Details
#initialize(yaml) ⇒ Frame
Returns a new instance of Frame.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/halation/roll/frame.rb', line 36 def initialize(yaml) @number = Coerce.integer(yaml["number"]) @date_captured = Coerce.date(yaml["date_captured"]) @date_scanned = Coerce.date(yaml["date_scanned"]) @lens = Coerce.string(yaml["lens"]) @focal_length = Coerce.integer(yaml["focal_length"]) @shutter = Coerce.string(yaml["shutter"]) @aperture = Coerce.string(yaml["aperture"]) @flash = Coerce.boolean(yaml["flash"]) @orientation = Coerce.integer(yaml["orientation"]) end |
Instance Attribute Details
#aperture ⇒ Object (readonly)
F-number of the aperture setting.
23 24 25 |
# File 'lib/halation/roll/frame.rb', line 23 def aperture @aperture end |
#date_captured ⇒ Object (readonly)
Date the frame was captured, in ISO 8601 format.
10 11 12 |
# File 'lib/halation/roll/frame.rb', line 10 def date_captured @date_captured end |
#date_scanned ⇒ Object (readonly)
Date the frame was scanned (digitized), in ISO 8601 format.
12 13 14 |
# File 'lib/halation/roll/frame.rb', line 12 def date_scanned @date_scanned end |
#flash ⇒ Object (readonly)
True if flash was fired.
25 26 27 |
# File 'lib/halation/roll/frame.rb', line 25 def flash @flash end |
#focal_length ⇒ Object (readonly)
Focal length of the lens, if not specified by the lens profile (a zoom lens).
17 18 19 |
# File 'lib/halation/roll/frame.rb', line 17 def focal_length @focal_length end |
#lens ⇒ Object (readonly)
Tag of the lens used.
14 15 16 |
# File 'lib/halation/roll/frame.rb', line 14 def lens @lens end |
#number ⇒ Object (readonly)
Frame number.
8 9 10 |
# File 'lib/halation/roll/frame.rb', line 8 def number @number end |
#orientation ⇒ Object (readonly)
1 = Horizontal (normal) 2 = Mirror horizontal 3 = Rotate 180 4 = Mirror vertical 5 = Mirror horizontal and rotate 270 CW 6 = Rotate 90 CW 7 = Mirror horizontal and rotate 90 CW 8 = Rotate 270 CW
34 35 36 |
# File 'lib/halation/roll/frame.rb', line 34 def orientation @orientation end |
#shutter ⇒ Object (readonly)
spec
Shutter speed.
21 22 23 |
# File 'lib/halation/roll/frame.rb', line 21 def shutter @shutter end |