Sha256: 0a1c74c3255a30a5969fff7c201404d6b8c64913aedf7c2ce51c482ac2e6b169
Contents?: true
Size: 503 Bytes
Versions: 3
Compression:
Stored size: 503 Bytes
Contents
module Fluffery module Utils class Internal # Merge any new classes with existing html classes # def self.merge_html_classes(options, classes) classes = [classes].flatten options.stringify_keys! return options.merge!('class' => classes.join(' ')) unless options.has_key?('class') old_classes = options['class'].split(' ') options.merge!('class' => [classes, old_classes].flatten.join(' ')) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fluffery-0.0.3 | lib/fluffery/utils/internal.rb |
fluffery-0.0.2 | lib/fluffery/utils/internal.rb |
fluffery-0.0.1 | lib/fluffery/utils/internal.rb |