Class: Voom::Presenters::DSL::Components::Content

Inherits:
EventBase
  • Object
show all
Includes:
Mixins::Attaches, Mixins::Common, Mixins::DateTimeFields, Mixins::Selects, Mixins::Snackbars, Mixins::TextFields
Defined in:
lib/voom/presenters/dsl/components/content.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::Snackbars

#snackbar

Methods included from Mixins::Selects

#select

Methods included from Mixins::DateTimeFields

#date_field, #datetime_field, #time_field

Methods included from Mixins::TextFields

#hidden_field, #text_area, #text_field

Methods included from Mixins::Attaches

#attach

Methods included from Mixins::Common

#badge, #card, #form, #list, #table

Methods included from Mixins::Menus

#menu

Methods included from Mixins::Content

#content

Methods included from Mixins::ExpansionPanels

#expansion_panel

Methods included from Mixins::Buttons

#button

Methods included from Mixins::Grids

#grid

Methods included from Mixins::Typography

#body, #display, #headline, #subheading, #title

Methods included from Mixins::Append

#<<, #yield_to

Methods included from Mixins::Toggles

#checkbox, #icon_toggle, #radio_button, #switch

Methods included from Mixins::Event

#event

Methods inherited from Base

#expand!

Methods included from Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#lock!, #locked?

Constructor Details

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

Returns a new instance of Content.



24
25
26
27
28
29
30
# File 'lib/voom/presenters/dsl/components/content.rb', line 24

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

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



22
23
24
# File 'lib/voom/presenters/dsl/components/content.rb', line 22

def components
  @components
end

#hiddenObject (readonly)

Returns the value of attribute hidden.



22
23
24
# File 'lib/voom/presenters/dsl/components/content.rb', line 22

def hidden
  @hidden
end

#shows_errorsObject (readonly)

Returns the value of attribute shows_errors.



22
23
24
# File 'lib/voom/presenters/dsl/components/content.rb', line 22

def shows_errors
  @shows_errors
end