Class: Voom::Presenters::DSL::Components::Menu::Divider

Inherits:
Base
  • Object
show all
Includes:
BaseMenuItem
Defined in:
lib/voom/presenters/dsl/components/menu.rb

Instance Attribute Summary

Attributes included from BaseMenuItem

#color, #position, #size

Attributes inherited from Base

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

Instance Method Summary collapse

Methods inherited from Base

#expand!

Methods included from Pluggable

#include_plugins, #plugin, #plugin_module

Methods included from Voom::Presenters::DSL::Components::Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#locked?

Constructor Details

#initialize(**attribs, &block) ⇒ Divider

Returns a new instance of Divider.



112
113
114
115
116
117
# File 'lib/voom/presenters/dsl/components/menu.rb', line 112

def initialize(**attribs, &block)
  super(type: :divider, **attribs, &block)
  @position = validate_position(attribs.delete(:position) { :top })
  @size = validate_size(attribs.delete(:size) { :normal })
  @color = attribs.delete(:color) { :primary }
end