Class: Satis::InputArray::Component

Inherits:
ApplicationComponent show all
Defined in:
app/components/satis/input_array/component.rb

Instance Attribute Summary collapse

Attributes inherited from ApplicationComponent

#original_view_context

Instance Method Summary collapse

Methods inherited from ApplicationComponent

add_helper, #component_name

Constructor Details

#initialize(form:, attribute:, **options) ⇒ Component

Returns a new instance of Component.



8
9
10
11
12
13
14
15
# File 'app/components/satis/input_array/component.rb', line 8

def initialize(form:, attribute:, **options)
  super

  @form = form
  @attribute = attribute
  @options = options
  options[:input_html] ||= {}
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



6
7
8
# File 'app/components/satis/input_array/component.rb', line 6

def attribute
  @attribute
end

#formObject (readonly)

Returns the value of attribute form.



6
7
8
# File 'app/components/satis/input_array/component.rb', line 6

def form
  @form
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'app/components/satis/input_array/component.rb', line 6

def options
  @options
end