class Voom::Presenters::DSL::Components::Content

Attributes

background_color[R]
components[R]
float[R]
height[R]
hidden[R]
inline[R]
padding[R]
position[R]
shows_errors[R]
text_align[R]
width[R]

Public Class Methods

new(**attribs_, &block) click to toggle source
Calls superclass method
# File lib/voom/presenters/dsl/components/content.rb, line 33
def initialize(**attribs_, &block)
  super(type: :content, **attribs_, &block)
  @components = []
  @hidden = attribs.delete(:hidden){false}
  @float = attribs.delete(:float){false}
  @width = attribs.delete(:width){nil}
  @height = attribs.delete(:height){nil}
  @shows_errors = attribs.delete(:shows_errors){false}
  @position = Array(attribs.delete(:position)).compact
  @text_align = attribs.delete(:text_align){'left'}
  padding = attribs.delete(:padding) {nil}
  @padding = validate_padding(coerce_padding(padding)).uniq if padding != nil
  @inline = attribs.delete(:inline){false}
  @background_color = attribs.delete(:background_color)
  expand!
end