Sha256: 58bd7643b718b179094432981d9f83d1c82c23380624699cdc1c55c091b82da6
Contents?: true
Size: 703 Bytes
Versions: 15
Compression:
Stored size: 703 Bytes
Contents
# frozen_string_literal: true module Proscenium class Phlex < ::Phlex::View module Sideload def template(...) Proscenium::SideLoad.append self.class.path if Rails.application.config.proscenium.side_load super end end class << self attr_accessor :path def inherited(child) path = caller_locations(1, 1)[0].path child.path = path.delete_prefix(::Rails.root.to_s).delete_suffix('.rb')[1..] child.prepend Sideload super end end def css_module(name) cssm.class_names!(name).join ' ' end private def cssm @cssm ||= Proscenium::CssModule.new(self.class.path) end end end
Version data entries
15 entries across 15 versions & 1 rubygems