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-0.5.4 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.5.3 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.5.2 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.5.1 motion-prime/helpers/has_style_chain_builder.rb
motion-prime-0.5.0 motion-prime/helpers/has_style_chain_builder.rb