Class: JekyllOpenSdgPlugins::IndicatorPage

Inherits:
Jekyll::Page
  • Object
show all
Defined in:
lib/jekyll-open-sdg-plugins/create_indicators.rb

Overview

A Page subclass used in the CreateIndicators class.

Instance Method Summary collapse

Constructor Details

#initialize(site, base, dir, inid, language, layout) ⇒ IndicatorPage

Returns a new instance of IndicatorPage.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/jekyll-open-sdg-plugins/create_indicators.rb', line 82

def initialize(site, base, dir, inid, language, layout)
  @site = site
  @base = base
  @dir  = dir
  @name = 'index.html'

  self.process(@name)
  self.data = {}
  self.data['indicator_number'] = inid.gsub('-', '.')
  self.data['layout'] = layout
  self.data['language'] = language
  # Backwards compatibility:

  self.data['indicator'] = self.data['indicator_number']
end