Sha256: 62687c7c8ca36078ff2195c280584aaddcfe6ddbbd6a858e85502c0aba61134f

Contents?: true

Size: 460 Bytes

Versions: 32

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

module Proscenium::CssModule
  extend ActiveSupport::Autoload

  autoload :Path
  autoload :Transformer

  # Accepts one or more CSS class names, and transforms them into CSS module names.
  #
  # @param name [String,Symbol,Array<String,Symbol>]
  def css_module(*names)
    cssm.class_names(*names, require_prefix: false).join ' '
  end

  private

  def cssm
    @cssm ||= Transformer.new(self.class.css_module_path)
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
proscenium-0.11.0.pre.9-x86_64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.9-aarch64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.9-arm64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.9-x86_64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.8-x86_64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.8-aarch64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.8-arm64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.8-x86_64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.7-x86_64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.7-aarch64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.7-arm64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.7-x86_64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.6-x86_64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.6-aarch64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.6-arm64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.6-x86_64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.5-x86_64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.5-aarch64-linux lib/proscenium/css_module.rb
proscenium-0.11.0.pre.5-arm64-darwin lib/proscenium/css_module.rb
proscenium-0.11.0.pre.5-x86_64-darwin lib/proscenium/css_module.rb