Class: JekyllOpenSdgPlugins::IndicatorConfigPage

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, meta, layout) ⇒ IndicatorConfigPage

Returns a new instance of IndicatorConfigPage.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/jekyll-open-sdg-plugins/create_indicators.rb', line 109

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

  self.process(@name)
  self.data = {}
  self.data['language'] = language
  self.data['indicator_number'] = inid.gsub('-', '.')
  self.data['config_type'] = 'indicator'
  self.data['layout'] = layout
  self.data['meta'] = meta
  self.data['title'] = 'Open SDG indicator configuration: ' + self.data['indicator_number']
  self.data['config_filename'] = inid + '.yml'
end