Class: ViewComponentScopedCss::CurrentContext
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- ViewComponentScopedCss::CurrentContext
- Defined in:
- lib/view_component_scoped_css/current_context.rb
Overview
Manage whether CSS has been Render
Class Method Summary collapse
Class Method Details
.render_if_need(view_component_class) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/view_component_scoped_css/current_context.rb', line 10 def self.render_if_need(view_component_class) self.called ||= {} if called[view_component_class.name] nil else called[view_component_class.name] = true ViewComponentScopedCss::Tag.new(view_component_class).call end end |