Sha256: 1d206562a31573c77a618398734574105eb3d75f28b6ecb3aaf0836fc936012a

Contents?: true

Size: 318 Bytes

Versions: 1

Compression:

Stored size: 318 Bytes

Contents

module Vedeu
  class Style < Virtus::Attribute
    def coerce(value_or_values)
      return '' if value_or_values.nil? || value_or_values.empty?

      if value_or_values.is_a?(::Array)
        value_or_values.map { |s| Esc.string(s) }.join

      else
        Esc.string(value_or_values)

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.1.10 lib/vedeu/models/style.rb