Sha256: 629c311cb1ee2e8005c9796154ab2dd9f303fc55ff70cc9103cff14e32e3308e
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
module Alveole module Concerns module Bem extend ActiveSupport::Concern included do const_set('COMPONENT_NAME', name.gsub('Component', '').underscore.dasherize) const_set('MODIFIERS', []) end def modifiers=(values) @bem_classes ||= [] @modifiers = values & self.class::MODIFIERS @modifiers.each do |modifier| @bem_classes << "#{self.class::COMPONENT_NAME}--#{modifier.to_s.dasherize}" end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alveole-0.0.1 | lib/alveole/concerns/bem.rb |