Module: Ariadne::ViewComponent::StyleVariants::ClassMethods
- Defined in:
- app/lib/ariadne/view_component/style_variants.rb
Instance Method Summary collapse
-
#default_style_name ⇒ Object
Returns the name of the default style set based on the class name: MyComponent::Component => my_component Namespaced::MyComponent => my_component.
Instance Method Details
#default_style_name ⇒ Object
Returns the name of the default style set based on the class name:
MyComponent::Component => my_component
Namespaced::MyComponent => my_component
10 11 12 |
# File 'app/lib/ariadne/view_component/style_variants.rb', line 10 def default_style_name @default_style_name ||= name.split("::")[-2].underscore.presence || "component" end |