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

Direct Known Subclasses

Stepper::Step

Instance Attribute Summary collapse

Attributes inherited from EventBase

#event_parent_id

Attributes included from Mixins::Event

#events

Attributes inherited from Base

#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type

Instance Method Summary collapse

Methods included from Mixins::Padding

#coerce_padding, #validate_padding

Methods included from Mixins::Progress

#progress

Methods included from Mixins::Avatar

#avatar

Methods included from Mixins::FileInputs

#file_input

Methods included from Mixins::Dialogs

#dialog

Methods included from Mixins::Icons

#icon

Methods included from Mixins::Chipset

#chipset

Methods included from Mixins::Append

#<<, #yield_to

Methods included from Mixins::Sliders

#slider

Methods included from Mixins::Steppers

#stepper

Methods included from Mixins::Snackbars

#snackbar

Methods included from Mixins::Selects

#multi_select, #select

Methods included from Mixins::DateTimeFields

#date_field, #datetime_field, #time_field

Methods included from Mixins::TextFields

#hidden_field, #number_field, #rich_text_area, #text_area, #text_field

Methods included from Mixins::Attaches

#attach

Methods included from Namespace

#_expand_namespace_

Methods included from Mixins::Common

#avatar, #badge, #card, #form, #list, #table, #unordered_list

Methods included from Mixins::Tables

#table

Methods included from Mixins::ImageLists

#image_list

Methods included from Mixins::Images

#image

Methods included from Mixins::TabBars

#tab_bar

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

#blank, #body, #body2, #caption, #headline, #headline1, #headline2, #headline3, #headline4, #headline5, #headline6, #link, #overline, #page_title, #separator, #subtitle, #subtitle2, #text, #title

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 Pluggable

#include_plugins, #plugin, #plugin_module

Methods included from Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#locked?

Constructor Details

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

Returns a new instance of Content.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/voom/presenters/dsl/components/content.rb', line 33

def initialize(**attribs_, &block)
  super(type: :content, **attribs_, &block)
  @components = []
  @hidden = attribs.delete(:hidden){false}
  @float = attribs.delete(:float){false}
  @width = attribs.delete(:width){nil}
  @height = attribs.delete(:height){nil}
  @shows_errors = attribs.delete(:shows_errors){false}
  @position = Array(attribs.delete(:position)).compact
  @text_align = attribs.delete(:text_align){'left'}
  padding = attribs.delete(:padding) {nil}
  @padding = validate_padding(coerce_padding(padding)).uniq if padding != nil
  @inline = attribs.delete(:inline){false}
  @background_color = attribs.delete(:background_color)
  expand!
end

Instance Attribute Details

#background_colorObject (readonly)

Returns the value of attribute background_color.



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

def background_color
  @background_color
end

#componentsObject (readonly)

Returns the value of attribute components.



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

def components
  @components
end

#floatObject (readonly)

Returns the value of attribute float.



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

def float
  @float
end

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#hiddenObject (readonly)

Returns the value of attribute hidden.



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

def hidden
  @hidden
end

#inlineObject (readonly)

Returns the value of attribute inline.



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

def inline
  @inline
end

#paddingObject (readonly)

Returns the value of attribute padding.



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

def padding
  @padding
end

#positionObject (readonly)

Returns the value of attribute position.



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

def position
  @position
end

#shows_errorsObject (readonly)

Returns the value of attribute shows_errors.



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

def shows_errors
  @shows_errors
end

#text_alignObject (readonly)

Returns the value of attribute text_align.



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

def text_align
  @text_align
end

#widthObject (readonly)

Returns the value of attribute width.



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

def width
  @width
end