Class: Avmtrf1::InventarioSistemas::SiteBuild::HtmlPageBase

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb,
lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb,
lib/avmtrf1/inventario_sistemas/site_build/html_page_base/elements.rb

Direct Known Subclasses

Index, Sistema, SistemasIndex

Defined Under Namespace

Modules: Elements, Layout

Constant Summary collapse

SITE_TITLE =
'Inventário de Sistemas'
' > '

Instance Method Summary collapse

Instance Method Details

#buildObject


16
17
18
19
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb', line 16

def build
  infom "Building #{href}..."
  output_path.write(output_content)
end

#hrefObject


21
22
23
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb', line 21

def href
  "#{uid}.html"
end

#output_pathObject


25
26
27
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb', line 25

def output_path
  site.output_directory.join(href)
end

#site_titleObject


35
36
37
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb', line 35

def site_title
  SITE_TITLE.to_s
end

#uidObject


29
30
31
32
33
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base.rb', line 29

def uid
  r = self.class.name.demodulize
  r += "_#{id}" if respond_to?(:id)
  r.parameterize
end