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.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/jekyll-open-sdg-plugins/create_indicators.rb', line 100

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