Sha256: 12d6b37f14140e1c7b971b292275dc95a47d4e81c15c1640a8eeba512c2914ea

Contents?: true

Size: 516 Bytes

Versions: 45

Compression:

Stored size: 516 Bytes

Contents

module MotionPrime
  module HasStyleChainBuilder
    def build_styles_chain(base_styles, suffixes)
      styles = []
      [*base_styles].each do |base_style|
        [*suffixes].each do |suffix|
          components = []
          # don't use present? here, it's slower, while this method should be very fast
          if base_style && base_style != '' && suffix && suffix != ''
            styles << [base_style.to_s, suffix.to_s].join('_').to_sym
          end
        end
      end
      styles
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
motion-prime-1.0.7 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.6 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.5 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.4 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.3 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.2 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.1 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-1.0.0 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.9.2 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.9.1 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.9 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.8 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.7 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.6 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.5 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.4 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.3 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.2 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.1 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.9.0 motion-prime/helpers/has_style_chain_builder.rb