Sha256: 24ed4821db895b971c7b254601dd0428fb7adfc546ff8bb9811e381abdaee7e2

Contents?: true

Size: 355 Bytes

Versions: 1

Compression:

Stored size: 355 Bytes

Contents

module Text2svg
  class Option < Struct.new(
    :font,
    :text_align,
    :fill,
    :stroke,
    :stroke_width,
    :encoding,
    :stroke,
    :stroke_width,
    :bold,
    :italic,
  )

    class << self
      def from_hash(h)
        o = new
        h.to_h.each do |k, v|
          o[k.to_sym] = v
        end
        o
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
text2svg-0.0.3 lib/text2svg/option.rb