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 ⇒ Object
readonly
Date the frame was captured 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.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/halation/roll/frame.rb', line 34 def initialize(yaml) @number = Coerce.integer(yaml["number"]) @date = Coerce.date(yaml["date"]) @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.
21 22 23 |
# File 'lib/halation/roll/frame.rb', line 21 def aperture @aperture end |
#date ⇒ Object (readonly)
Date the frame was captured in ISO 8601 format.
10 11 12 |
# File 'lib/halation/roll/frame.rb', line 10 def date @date end |
#flash ⇒ Object (readonly)
True if flash was fired.
23 24 25 |
# File 'lib/halation/roll/frame.rb', line 23 def flash @flash end |
#focal_length ⇒ Object (readonly)
Focal length of the lens, if not specified by the lens profile (a zoom lens).
15 16 17 |
# File 'lib/halation/roll/frame.rb', line 15 def focal_length @focal_length end |
#lens ⇒ Object (readonly)
Tag of the lens used.
12 13 14 |
# File 'lib/halation/roll/frame.rb', line 12 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
32 33 34 |
# File 'lib/halation/roll/frame.rb', line 32 def orientation @orientation end |
#shutter ⇒ Object (readonly)
spec
Shutter speed.
19 20 21 |
# File 'lib/halation/roll/frame.rb', line 19 def shutter @shutter end |