Class: Voom::Presenters::DSL::Components::Separator

Inherits:
Base
  • Object
show all
Includes:
Mixins::Padding
Defined in:
lib/voom/presenters/dsl/components/separator.rb

Instance Attribute Summary collapse

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 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) ⇒ Separator

Returns a new instance of Separator.



8
9
10
11
12
13
# File 'lib/voom/presenters/dsl/components/separator.rb', line 8

def initialize(**attribs_, &block)
  super(type: :separator, **attribs_, &block)
  padding = attribs.delete(:padding) {:full}
  @padding = validate_padding(coerce_padding(padding)).uniq if padding != nil
  expand!
end

Instance Attribute Details

#paddingObject (readonly)

Returns the value of attribute padding.



6
7
8
# File 'lib/voom/presenters/dsl/components/separator.rb', line 6

def padding
  @padding
end