Class: Voom::Presenters::DSL::Components::Form

Inherits:
EventBase show all
Includes:
Mixins::Append, Mixins::Attaches, Mixins::Buttons, Mixins::Content, Mixins::ExpansionPanels, Mixins::Grids, Mixins::Selects, Mixins::TextFields, Mixins::Toggles
Defined in:
lib/voom/presenters/dsl/components/form.rb

Instance Attribute Summary collapse

Attributes inherited from EventBase

#event_parent_id

Attributes included from Mixins::Event

#events

Attributes inherited from Base

#attributes, #context, #id, #type

Instance Method Summary collapse

Methods included from Mixins::Content

#content

Methods included from Mixins::ExpansionPanels

#expansion_panel

Methods included from Mixins::Attaches

#attach

Methods included from Mixins::Buttons

#button

Methods included from Mixins::Toggles

#checkbox, #icon_toggle, #radio_button, #switch

Methods included from Mixins::Append

#<<, #yield_to

Methods included from Mixins::Selects

#select

Methods included from Mixins::TextFields

#datetime_field, #hidden_field, #text_area, #text_field

Methods included from Mixins::Grids

#grid

Methods included from Mixins::Event

#event

Methods inherited from Base

#expand!

Methods included from Serializer

#to_hash

Methods included from Lockable

#lock!, #locked?

Constructor Details

#initialize(**attribs_, &block) ⇒ Form

Returns a new instance of Form.



32
33
34
35
36
37
# File 'lib/voom/presenters/dsl/components/form.rb', line 32

def initialize(**attribs_, &block)
  super(type: :form, **attribs_, &block)
  @shows_errors = attribs.delete(:shows_errors){true}
  @components = []
  expand!
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



30
31
32
# File 'lib/voom/presenters/dsl/components/form.rb', line 30

def components
  @components
end

#shows_errorsObject (readonly)

Returns the value of attribute shows_errors.



30
31
32
# File 'lib/voom/presenters/dsl/components/form.rb', line 30

def shows_errors
  @shows_errors
end