Sha256: fda91040d12e913934343c8851f34f3ccf7d6adaf7feb5aadda7bdeb505373d7
Contents?: true
Size: 1.21 KB
Versions: 33
Compression:
Stored size: 1.21 KB
Contents
module Fontist module Utils module Dsl class Font REQUIRED_ATTRIBUTES = %i[family_name style full_name filename].freeze attr_reader :attributes def initialize(attributes) REQUIRED_ATTRIBUTES.each do |required_attribute| unless attributes[required_attribute] raise(Fontist::Errors::MissingAttributeError.new( "Missing attribute: #{required_attribute}" )) end end self.attributes = attributes end def attributes=(attrs) @attributes = { family_name: attrs[:family_name], type: attrs[:style], full_name: attrs[:full_name], post_script_name: attrs[:post_script_name], version: attrs[:version], description: attrs[:description], copyright: attrs[:copyright], font: attrs[:filename], source_font: attrs[:source_filename] } end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems