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

Instance Method Summary collapse

Constructor Details

#initialize(site, base, dir, inid, language, meta, title, config_type, form_settings, layout) ⇒ IndicatorConfigPage

Returns a new instance of IndicatorConfigPage.



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/jekyll-open-sdg-plugins/create_indicators.rb', line 162

def initialize(site, base, dir, inid, language, meta, title, config_type, form_settings, layout)
  @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['config_type'] = config_type
  self.data['layout'] = layout
  self.data['meta'] = meta
  self.data['title'] = title + ': ' + inid.gsub('-', '.')
  self.data['config_filename'] = inid + '.yml'
  self.data['form_settings'] = form_settings
end