Class: Trekyll::TrekyllConfigurator

Inherits:
Object
  • Object
show all
Defined in:
lib/trekyll/configurator.rb

Constant Summary collapse

INIT_CONFIGURABLE_ATTRIBUTES =
[
    :key,
    :token,
    :board,
    :pages,
    :posts,
    :widgets,
    :blocks,
    :navigation
]

Instance Method Summary collapse

Constructor Details

#initializeTrekyllConfigurator

constructor



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/trekyll/configurator.rb', line 19

def initialize()
    config = ""

    if File.file?('_init.yml')
        config = YAML.load_file('_init.yml')
    else
        puts "OHhh there is no '_init.yml' file in your project !!! "
    end

    @key            = config['developer_public_key']
    @token          = config['member_token']
    @board          = config['board']
    @pages          = config['pages']
    @posts          = config['posts']
    @widgets        = config['widgets']
    @blocks         = config['blocks']
    @navigation     = config['navigation']
end