Sha256: eb0cd533da2f1d1d841d93eadbb7d156e7c5ad918a19b4b9b5b7d275e7480f5b
Contents?: true
Size: 674 Bytes
Versions: 5
Compression:
Stored size: 674 Bytes
Contents
module OpenXml module Docx module Elements class EmbedRegular < Element namespace :w with_namespace :w do attribute :font_key, displays_as: :fontKey, matches: /\{[0-9A-F]{8}\-[0-9A-F]{4}\-[0-9A-F]{4}\-[0-9A-F]{4}\-[0-9A-F]{12}\}/ # Regex taken from spec section 22.9.2.4 attribute :subsetted, expects: :boolean end attribute :relationship_id, expects: :string, displays_as: :id, namespace: :r private def bracketed_guid(value) guid_regex = raise ArgumentError, "Not a validly-formatted GUID (#{value})" unless value =~ guid_regex end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems