Module: StyleCapsule
- Defined in:
- lib/style_capsule.rb,
lib/style_capsule/helper.rb,
lib/style_capsule/railtie.rb,
lib/style_capsule/version.rb,
lib/style_capsule/component.rb,
lib/style_capsule/asset_path.rb,
lib/style_capsule/phlex_helper.rb,
lib/style_capsule/css_processor.rb,
lib/style_capsule/class_registry.rb,
lib/style_capsule/view_component.rb,
lib/style_capsule/css_file_writer.rb,
lib/style_capsule/instrumentation.rb,
lib/style_capsule/component_builder.rb,
lib/style_capsule/standalone_helper.rb,
lib/style_capsule/helper_scope_cache.rb,
lib/style_capsule/stylesheet_registry.rb,
lib/style_capsule/view_component_helper.rb,
lib/style_capsule/component_class_methods.rb,
lib/style_capsule/component_styles_support.rb,
lib/style_capsule/head_injection_middleware.rb,
sig/style_capsule.rbs
Overview
ActiveSupport string extensions are conditionally required in lib/style_capsule.rb
Defined Under Namespace
Modules: AssetPath, Component, ComponentClassMethods, ComponentStylesSupport, CssProcessor, Helper, HelperScopeCache, Instrumentation, PhlexHelper, StandaloneHelper, ViewComponent, ViewComponentHelper Classes: ClassRegistry, ComponentBuilder, CssFileWriter, HeadInjectionMiddleware, Railtie, StylesheetRegistry
Constant Summary collapse
- VERSION =
"2.0.1"
Class Method Summary collapse
-
.stylesheet_registry_parent_class ⇒ Object
Helper to determine the parent class for StylesheetRegistry ActiveSupport::CurrentAttributes is optional - if ActiveSupport is loaded, it will be available.
Class Method Details
.stylesheet_registry_parent_class ⇒ Object
Helper to determine the parent class for StylesheetRegistry ActiveSupport::CurrentAttributes is optional - if ActiveSupport is loaded, it will be available. Otherwise, we fall back to Object.
This is evaluated at class definition time, so it can't be stubbed. For testing fallback paths, use the instance methods that check availability.
13 14 15 |
# File 'lib/style_capsule/stylesheet_registry.rb', line 13 def self.stylesheet_registry_parent_class defined?(ActiveSupport::CurrentAttributes) ? ActiveSupport::CurrentAttributes : Object end |