class Voom::Presenters::DSL::Components::UnorderedList

Attributes

list_items[R]
list_style[R]

Public Class Methods

new(**attribs_, &block) click to toggle source
# File lib/voom/presenters/dsl/components/unordered_list.rb, line 9
def initialize(**attribs_, &block)
  super(type: :unordered_list, **attribs_, &block)
  @list_style = attribs.delete(:list_style){ :disc }
  @list_items = []
  expand!
end

Public Instance Methods

list_item(text=nil, **attribs_, &block) click to toggle source
# File lib/voom/presenters/dsl/components/unordered_list.rb, line 16
def list_item(text=nil, **attribs_, &block)
  @list_items << ListItem.new(parent: self, text: text, **attribs_, &block)
end