Class: Juggalo::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/juggalo/page.rb

Defined Under Namespace

Classes: Loader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(layout, loader) ⇒ Page

Returns a new instance of Page.



5
6
7
8
# File 'lib/juggalo/page.rb', line 5

def initialize(layout, loader)
  @layout = layout
  @loader = loader
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



3
4
5
# File 'lib/juggalo/page.rb', line 3

def components
  @components
end

#templateObject (readonly)

Returns the value of attribute template.



3
4
5
# File 'lib/juggalo/page.rb', line 3

def template
  @template
end

Instance Method Details

#compileObject



10
11
12
13
# File 'lib/juggalo/page.rb', line 10

def compile
  @layout.regions = compose
  @layout.render
end