Sha256: 00f73d3f21437fa2f35e15716a02e94bb82a7946de08e96de893886687f56648
Contents?: true
Size: 847 Bytes
Versions: 23
Compression:
Stored size: 847 Bytes
Contents
# frozen_string_literal: true module Proscenium::CssModule extend ActiveSupport::Autoload class StylesheetNotFound < StandardError def initialize(pathname) @pathname = pathname super end def message "Stylesheet is required, but does not exist: #{@pathname}" end end autoload :ClassNamesResolver autoload :Resolver # deprecated # Like `css_modules`, but will raise if the stylesheet cannot be found. # # @param name [Array, String] def css_module!(names) cssm.class_names!(names).join ' ' end # Accepts one or more CSS class names, and transforms them into CSS module names. # # @param name [Array, String] def css_module(names) cssm.class_names(names).join ' ' end private def path self.class.path end def cssm @cssm ||= Resolver.new(path) end end
Version data entries
23 entries across 23 versions & 1 rubygems