Class: ViewComponent::Form::Configuration
- Inherits:
-
Object
- Object
- ViewComponent::Form::Configuration
- Defined in:
- lib/view_component/form/configuration.rb
Instance Attribute Summary collapse
-
#lookup_chain ⇒ Object
Returns the value of attribute lookup_chain.
-
#parent_component ⇒ Object
Returns the value of attribute parent_component.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/view_component/form/configuration.rb', line 8 def initialize @parent_component = "ViewComponent::Base" @lookup_chain = [ lambda do |component_name, namespaces: []| namespaces.lazy.map do |namespace| "#{namespace}::#{component_name.to_s.camelize}Component".safe_constantize end.find(&:itself) end ] end |
Instance Attribute Details
#lookup_chain ⇒ Object
Returns the value of attribute lookup_chain.
6 7 8 |
# File 'lib/view_component/form/configuration.rb', line 6 def lookup_chain @lookup_chain end |
#parent_component ⇒ Object
Returns the value of attribute parent_component.
6 7 8 |
# File 'lib/view_component/form/configuration.rb', line 6 def parent_component @parent_component end |