Class: Jquard::Schemas::Layouts::Section

Inherits:
Layout
  • Object
show all
Defined in:
lib/jquard/schemas/layouts/section.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Layout

#columns, #schema

Methods included from ComponentDispatch

#component_class

Constructor Details

#initialize(heading = nil) ⇒ Section

Returns a new instance of Section.



11
12
13
# File 'lib/jquard/schemas/layouts/section.rb', line 11

def initialize(heading = nil)
  @heading = heading
end

Instance Attribute Details

#headingObject (readonly)

Returns the value of attribute heading.



5
6
7
# File 'lib/jquard/schemas/layouts/section.rb', line 5

def heading
  @heading
end

Class Method Details

.make(heading = nil) ⇒ Object



7
8
9
# File 'lib/jquard/schemas/layouts/section.rb', line 7

def self.make(heading = nil)
  new(heading)
end

Instance Method Details

#description(value = nil) ⇒ Object



15
16
17
18
19
20
# File 'lib/jquard/schemas/layouts/section.rb', line 15

def description(value = nil)
  return @description if value.nil?

  @description = value
  self
end