Sha256: 500f24a6b4820d25b17ef32b78b56752b5fad553e9321be08aa24febdc5b6155
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
require_relative '../coerce' module Halation class Roll # A frame on the roll of film. class Frame # Frame number. attr_reader :number # Date the frame was captured in ISO 8601 format. attr_reader :date # Tag of the lens used. attr_reader :lens # Focal length of the lens, if not specified by the lens profile # (a zoom lens). attr_reader :focal_length # @todo spec # Shutter speed. # @example "1/125", "0.5" (half second), "15" (seconds), "120" (2 minutes) attr_reader :shutter # F-number of the aperture setting. attr_reader :aperture # True if flash was fired. attr_reader :flash # 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 attr_reader :orientation 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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
halation-0.2.1 | lib/halation/roll/frame.rb |