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
#content, inherited, #input?, #perform_render, #render?, #to_component, #type
Methods included from ActsAsComponent
#base_template_path, #compile!, extended, #renders_templates, #template_root_path
Methods included from ClassNameHelper
Constructor Details
permalink #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
permalink #builder_or_view ⇒ Object
[View source]
13 14 15 |
# File 'app/lib/primer/forms/form_reference.rb', line 13 def builder_or_view @input.nested? ? builder : @view_context end |