Class: Voom::Presenters::DSL::Components::Table
- Includes:
- Mixins::Common, Mixins::Event
- Defined in:
- lib/voom/presenters/dsl/components/table.rb
Defined Under Namespace
Classes: Pagination, Row
Instance Attribute Summary collapse
-
#border ⇒ Object
Returns the value of attribute border.
-
#header(**attribs, &block) ⇒ Object
Returns the value of attribute header.
-
#rows ⇒ Object
Returns the value of attribute rows.
-
#selectable ⇒ Object
Returns the value of attribute selectable.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes included from Mixins::Event
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
- #footer(**attribs, &block) ⇒ Object
-
#initialize(**attribs_, &block) ⇒ Table
constructor
A new instance of Table.
- #pagination(**attribs, &block) ⇒ Object
- #row(**attribs, &block) ⇒ Object
Methods included from Mixins::Event
Methods included from Mixins::Common
#avatar, #badge, #card, #form, #list, #table, #unordered_list
Methods included from Mixins::Tables
Methods included from Mixins::Dialogs
Methods included from Mixins::ImageLists
Methods included from Mixins::Icons
Methods included from Mixins::Images
Methods included from Mixins::TabBars
Methods included from Mixins::Menus
Methods included from Mixins::Content
Methods included from Mixins::ExpansionPanels
Methods included from Mixins::Buttons
Methods included from Mixins::Grids
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::Append
Methods included from Mixins::Toggles
#checkbox, #icon_toggle, #radio_button, #switch
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Table
Returns a new instance of Table.
10 11 12 13 14 15 16 17 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 10 def initialize(**attribs_, &block) super(type: :table, **attribs_, &block) @selectable = attribs.delete(:selectable) @border = attribs.delete(:border){ true } @width = attribs.delete(:width) @rows = [] end |
Instance Attribute Details
#border ⇒ Object
Returns the value of attribute border.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 8 def border @border end |
#header(**attribs, &block) ⇒ Object
Returns the value of attribute header.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 8 def header @header end |
#rows ⇒ Object
Returns the value of attribute rows.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 8 def rows @rows end |
#selectable ⇒ Object
Returns the value of attribute selectable.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 8 def selectable @selectable end |
#width ⇒ Object
Returns the value of attribute width.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 8 def width @width end |
Instance Method Details
#footer(**attribs, &block) ⇒ Object
25 26 27 28 29 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 25 def (**attribs, &block) return @footer if locked? @footer = Row.new(parent: self, type: :footer, **attribs, &block) end |
#pagination(**attribs, &block) ⇒ Object
36 37 38 39 40 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 36 def pagination(**attribs, &block) return @pagination if locked? @pagination = Pagination.new(parent: self, **attribs, &block) end |