Class: Jquard::Schemas::Layouts::Layout

Inherits:
Object
  • Object
show all
Includes:
ComponentDispatch
Defined in:
lib/jquard/schemas/layouts/layout.rb

Direct Known Subclasses

Grid, Section

Instance Method Summary collapse

Methods included from ComponentDispatch

#component_class

Instance Method Details

#columns(count = nil) ⇒ Object



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

def columns(count = nil)
  return @columns || 1 if count.nil?

  @columns = count
  self
end

#schema(components = nil) ⇒ Object



7
8
9
10
11
12
# File 'lib/jquard/schemas/layouts/layout.rb', line 7

def schema(components = nil)
  return @schema ||= [] if components.nil?

  @schema = components
  self
end