class Halation::Config::Camera

A camera profile.

Attributes

lenses[R]
make[R]
model[R]
tag[R]

A user-created ID.

Public Class Methods

new(yaml) click to toggle source
# File lib/halation/config/camera.rb, line 14
def initialize(yaml)
  @tag = Coerce.string(yaml["tag"])
  @make = Coerce.string(yaml["make"])
  @model = Coerce.string(yaml["model"])
  @lenses = []

  yaml["lenses"].each do |lens|
    @lenses << Lens.new(lens)
  end
end

Public Instance Methods

to_s() click to toggle source

@return [String]

# File lib/halation/config/camera.rb, line 26
def to_s
  "Camera\n" <<
  [
    "Tag: #{tag}",
    "Make: #{make}",
    "Model: #{model}",
    @lenses.map(&:to_s).join("\n")
  ]
    .join("\n")
    .lines
    .map { |line| "   #{line}" }
    .join
end