Class: JekyllOpenSdgPlugins::IndicatorDataPage

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 for the indicator data forms.

Instance Method Summary collapse

Constructor Details

#initialize(site, base, dir, inid, language, title, form_settings) ⇒ IndicatorDataPage

Returns a new instance of IndicatorDataPage.



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/jekyll-open-sdg-plugins/create_indicators.rb', line 183

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

  self.process(@name)
  self.data = {}
  self.data['language'] = language
  self.data['indicator_number'] = inid
  self.data['layout'] = 'data-editor'
  self.data['title'] = title + ': ' + inid.gsub('-', '.')
  self.data['config_filename'] = 'indicator_' + inid
  self.data['form_settings'] = form_settings
end