Class: Voom::Presenters::DSL::Components::Grid::Column

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

#chip

Methods included from Mixins::Dialogs

#dialog

Methods included from Mixins::Attaches

#attach

Methods included from Mixins::Icons

#icon

Methods included from Mixins::Images

#image

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::Event

#event

Methods inherited from Base

#expand!

Methods included from Serializer

#to_hash

Methods included from Lockable

#lock!, #locked?

Constructor Details

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

Returns a new instance of Column.



49
50
51
52
53
54
55
56
57
58
# File 'lib/voom/presenters/dsl/components/grid.rb', line 49

def initialize(**attribs_, &block)
  super(type: :column, **attribs_, &block)
  @size = attribs.delete(:size) || 1
  @desktop = attribs.delete(:desktop)
  @tablet = attribs.delete(:tablet)
  @phone = attribs.delete(:phone)
  @color = attribs.delete(:color)
  @components = []
  expand!
end

Instance Attribute Details

#colorObject (readonly)

Returns the value of attribute color.



47
48
49
# File 'lib/voom/presenters/dsl/components/grid.rb', line 47

def color
  @color
end

#componentsObject (readonly)

Returns the value of attribute components.



47
48
49
# File 'lib/voom/presenters/dsl/components/grid.rb', line 47

def components
  @components
end

#desktopObject (readonly)

Returns the value of attribute desktop.



47
48
49
# File 'lib/voom/presenters/dsl/components/grid.rb', line 47

def desktop
  @desktop
end

#phoneObject (readonly)

Returns the value of attribute phone.



47
48
49
# File 'lib/voom/presenters/dsl/components/grid.rb', line 47

def phone
  @phone
end

#sizeObject (readonly)

Returns the value of attribute size.



47
48
49
# File 'lib/voom/presenters/dsl/components/grid.rb', line 47

def size
  @size
end

#tabletObject (readonly)

Returns the value of attribute tablet.



47
48
49
# File 'lib/voom/presenters/dsl/components/grid.rb', line 47

def tablet
  @tablet
end