Class: SiteSettings::FormComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- SiteSettings::FormComponent
- Defined in:
- app/components/site_settings/form_component.rb
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
-
#settings_path ⇒ Object
readonly
Returns the value of attribute settings_path.
Instance Method Summary collapse
-
#initialize(settings:, settings_path:) ⇒ FormComponent
constructor
A new instance of FormComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(settings:, settings_path:) ⇒ FormComponent
Returns a new instance of FormComponent.
3 4 5 6 |
# File 'app/components/site_settings/form_component.rb', line 3 def initialize(settings:, settings_path:) @settings = settings @settings_path = settings_path end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
8 9 10 |
# File 'app/components/site_settings/form_component.rb', line 8 def settings @settings end |
#settings_path ⇒ Object (readonly)
Returns the value of attribute settings_path.
8 9 10 |
# File 'app/components/site_settings/form_component.rb', line 8 def settings_path @settings_path end |
Instance Method Details
#render? ⇒ Boolean
10 11 12 |
# File 'app/components/site_settings/form_component.rb', line 10 def render? @settings.present? end |