class Caracal::Core::Models::FontModel

This class encapsulates the logic needed to store and manipulate font data.

Attributes

font_name[R]

accessors

Public Instance Methods

matches?(str) click to toggle source
STATE ================================
# File lib/caracal/core/models/font_model.rb, line 38
def matches?(str)
  font_name.to_s.downcase == str.to_s.downcase
end
valid?() click to toggle source
VALIDATION ===========================
# File lib/caracal/core/models/font_model.rb, line 45
def valid?
  a = [:name]
  a.map { |m| send("font_#{ m }") }.compact.size == a.size
end

Private Instance Methods

option_keys() click to toggle source
# File lib/caracal/core/models/font_model.rb, line 56
def option_keys
  [:name]
end