Module: Sevgi::Graphics::Attribute Private
- Extended by:
- Ident
- Defined in:
- lib/sevgi/graphics/attribute.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Attribute name normalization helpers.
Defined Under Namespace
Class Method Summary collapse
-
.xml_text(value) ⇒ String
private
Returns the text form used for an XML attribute value before escaping.
Methods included from Ident
Class Method Details
.xml_text(value) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the text form used for an XML attribute value before escaping.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/sevgi/graphics/attribute.rb', line 48 def self.xml_text(value) case value when ::Hash value.map { |key, attr_value| "#{key}:#{attr_value}" }.join("; ") when ::Array value.join(" ") else value.to_s end end |