Sha256: 9f523ae328704f20cb3eb7b9e49ace3068bdb32287ab2c164499d2d6d952e7b7
Contents?: true
Size: 359 Bytes
Versions: 3
Compression:
Stored size: 359 Bytes
Contents
require 'virtus' require_relative '../support/esc' module Vedeu class StyleCollection < Virtus::Attribute def coerce(values) return '' if values.nil? || values.empty? if values.is_a?(::Array) values.map { |value| Esc.string(value) }.join elsif values.is_a?(::String) Esc.string(values) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.0.32 | lib/vedeu/models/style_collection.rb |
vedeu-0.0.31 | lib/vedeu/models/style_collection.rb |
vedeu-0.0.30 | lib/vedeu/models/style_collection.rb |