Class: Voom::Presenters::DSL::Components::Page

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

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes, #context, #id, #type

Instance Method Summary collapse

Methods inherited from Base

#expand!

Methods included from Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#lock!, #locked?

Constructor Details

#initialize(**attribs_, &block) ⇒ Page

Returns a new instance of Page.



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

def initialize(**attribs_, &block)
  super(type: :page,
        context: context,
        **attribs_, &block)
  expand!
end

Instance Attribute Details

#background_color(color = nil) ⇒ Object

Returns the value of attribute background_color.



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

def background_color
  @background_color
end

#title(title = nil) ⇒ Object

Returns the value of attribute title.



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

def title
  @title
end