Class: AlphaSimprini::Page

Inherits:
Erector::Widget
  • Object
show all
Defined in:
lib/alpha_simprini/page.rb

Instance Method Summary collapse

Instance Method Details

#assetsObject



18
19
# File 'lib/alpha_simprini/page.rb', line 18

def assets
end

#body_contentObject



33
34
35
# File 'lib/alpha_simprini/page.rb', line 33

def body_content
  copy :blank
end

#contentObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/alpha_simprini/page.rb', line 4

def content
  text :doctype_html
  html do
    head do
      csrf_meta_tag
      title :application_title
      assets
    end
    body do
      body_content
    end
  end
end

#copy(key) ⇒ Object



21
22
23
# File 'lib/alpha_simprini/page.rb', line 21

def copy key
  p t(key)
end

#text(value) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/alpha_simprini/page.rb', line 25

def text(value)
  if value.is_a? Symbol
    output << h(t(value))
  else
    super
  end
end