Sha256: 77ee5be84733183c960bc0cca210eb63a0dc7104a0ebf107062d775bbc18e834

Contents?: true

Size: 390 Bytes

Versions: 6

Compression:

Stored size: 390 Bytes

Contents

module MojoMagick
  class Font
    attr_accessor :name, :family, :style, :stretch, :weight, :glyphs

    def valid?
      !name.nil?
    end

    def initialize(property_hash = {})
      %i[name family style stretch weight glyphs].each do |f|
        setter = "#{f}="
        send(setter, property_hash[f])
      end
    end

    def self.all
      ImageMagick::Fonts.all
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mojo_magick-0.6.8 lib/mojo_magick/font.rb
mojo_magick-0.6.7 lib/mojo_magick/font.rb
mojo_magick-0.6.6 lib/mojo_magick/font.rb
mojo_magick-0.6.5 lib/mojo_magick/font.rb
mojo_magick-0.6.4 lib/mojo_magick/font.rb
mojo_magick-0.6.3 lib/mojo_magick/font.rb