Sha256: 467f7f5824f20f1dcfd5d2ae37e00f6ec2c7bb6778c8b5b68116d2a813168779
Contents?: true
Size: 590 Bytes
Versions: 5
Compression:
Stored size: 590 Bytes
Contents
module NdrUi # Provides CSS helper methods module CssHelper # This method merges the specified css_classes into the options hash def css_class_options_merge(options, css_classes = [], &block) options = options.symbolize_keys css_classes += options[:class].split(' ') if options.include?(:class) yield(css_classes) if block_given? options[:class] = css_classes.join(' ') unless css_classes.empty? unless css_classes == css_classes.uniq fail "Multiple css class definitions: #{css_classes.inspect}" end options end end end
Version data entries
5 entries across 5 versions & 1 rubygems