class Halation::Config::Lens

A lens profile.

Attributes

focal_length[R]
model[R]
tag[R]

A user-created ID.

Public Class Methods

new(yaml) click to toggle source
# File lib/halation/config/lens.rb, line 12
def initialize(yaml)
  @tag = Coerce.string(yaml["tag"])
  @model = Coerce.string(yaml["model"])
  @focal_length = Coerce.integer(yaml["focal_length"])
end

Public Instance Methods

to_s() click to toggle source

@return [String]

# File lib/halation/config/lens.rb, line 19
def to_s
  "Lens\n" <<
  [
    "Tag: #{tag}",
    "Model: #{model}",
    "Focal Length: #{focal_length}",
  ]
    .map { |line| "   #{line}" }
    .join("\n")
end