Class: Trek::Form::GroupComponent

Inherits:
ViewComponent::Form::FieldComponent
  • Object
show all
Includes:
CssClassesHelpers
Defined in:
app/components/trek/form/group_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CssClassesHelpers

#class_for, #class_names_for, #root_class

Methods included from IdentifierHelper

#identifier

Constructor Details

#initialize(form, object_name, method_name, options = {}) ⇒ GroupComponent

Returns a new instance of GroupComponent.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/components/trek/form/group_component.rb', line 12

def initialize(form, object_name, method_name, options = {})
  @label = options.delete(:label)
  @hint = options.delete(:hint)
  @lookup = options.delete(:lookup)
  @classnames = options.delete(:classnames)
  @multiple = options.delete(:multiple)
  @content_id = options.delete(:content_id)
  @model_name = options.delete(:model_name)
  @object_name = object_name

  super
end

Instance Attribute Details

#lookupObject (readonly)

Returns the value of attribute lookup.



10
11
12
# File 'app/components/trek/form/group_component.rb', line 10

def lookup
  @lookup
end

#model_nameObject (readonly)

Returns the value of attribute model_name.



10
11
12
# File 'app/components/trek/form/group_component.rb', line 10

def model_name
  @model_name
end

#objectObject (readonly)

Returns the value of attribute object.



10
11
12
# File 'app/components/trek/form/group_component.rb', line 10

def object
  @object
end