Class: Avo::Fields::Common::KeyValueComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
ApplicationHelper
Defined in:
app/components/avo/fields/common/key_value_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ApplicationHelper

#a_button, #a_link, #button_classes, #empty_state, #get_model_class, #input_classes, #render_license_warning, #render_license_warnings, #root_path_without_url, #svg

Constructor Details

#initialize(field:, form: nil, view: :show) ⇒ KeyValueComponent

Returns a new instance of KeyValueComponent.



8
9
10
11
12
# File 'app/components/avo/fields/common/key_value_component.rb', line 8

def initialize(field:, form: nil, view: :show)
  @field = field
  @form = form
  @view = view
end

Instance Attribute Details

#viewObject (readonly)

Returns the value of attribute view.



6
7
8
# File 'app/components/avo/fields/common/key_value_component.rb', line 6

def view
  @view
end