Class: Primer::Forms::FormReference
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Primer::Forms::FormReference
- Defined in:
- app/lib/primer/forms/form_reference.rb
Overview
:nodoc:
Instance Method Summary collapse
- #builder_or_view ⇒ Object
-
#initialize(input:) ⇒ FormReference
constructor
A new instance of FormReference.
Methods inherited from BaseComponent
compile!, #content, #input?, #perform_render, #render?, #to_component, #type
Methods included from ActsAsComponent
#compile!, extended, #renders_templates
Methods included from ClassNameHelper
Constructor Details
#initialize(input:) ⇒ FormReference
Returns a new instance of FormReference.
9 10 11 |
# File 'app/lib/primer/forms/form_reference.rb', line 9 def initialize(input:) @input = input end |
Instance Method Details
#builder_or_view ⇒ Object
13 14 15 |
# File 'app/lib/primer/forms/form_reference.rb', line 13 def builder_or_view @input.nested? ? builder : @view_context end |