Sha256: 3e70b4651852debf656f5492e03d04ab93839788e5ce78cc76e0e2cdabc02650

Contents?: true

Size: 296 Bytes

Versions: 9

Compression:

Stored size: 296 Bytes

Contents

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

    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

9 entries across 9 versions & 1 rubygems

Version Path
text2svg-0.3.6 lib/text2svg/option.rb
text2svg-0.3.5 lib/text2svg/option.rb
text2svg-0.3.4 lib/text2svg/option.rb
text2svg-0.3.3 lib/text2svg/option.rb
text2svg-0.3.2 lib/text2svg/option.rb
text2svg-0.3.1 lib/text2svg/option.rb
text2svg-0.2.0 lib/text2svg/option.rb
text2svg-0.1.1 lib/text2svg/option.rb
text2svg-0.1.0 lib/text2svg/option.rb