Class: Skyline::Configuration

Inherits:
Configure
  • Object
show all
Defined in:
lib/skyline/configuration.rb

Overview

TODO:

This configuration class will soon change as it’s not flexible enough for out purposes.

Contains the default skyline configuration. Currently this is also the place to look for available configuration options.

Instance Method Summary collapse

Instance Method Details

#after_configureObject



63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/skyline/configuration.rb', line 63

def after_configure
  check_or_create_path(self["assets_path"],"assets_path")
  check_or_create_path(self["media_file_cache_path"],"media_file_cache_path")
  check_or_create_path(self["rss_section_cache_path"],"rss_section_cache_path")
  
  Skyline::MediaNode.assets_path = self["assets_path"]  
  Skyline::MediaCache.cache_path = self["media_file_cache_path"]
  Skyline::Sections::RssSection.cache_path = self["rss_section_cache_path"]
  Skyline::Sections::RssSection.cache_timeout = self["rss_section_cache_timeout"]
  
  Skyline::Rendering::Renderer.register_renderables(:sections,self["sections"])
  Skyline::Rendering::Renderer.register_renderables(:articles,self["articles"] + ["Skyline::Page"])      
end

#articlesObject



77
78
79
# File 'lib/skyline/configuration.rb', line 77

def articles
  self["articles"].map(&:constantize)
end

#content_classesObject



81
82
83
# File 'lib/skyline/configuration.rb', line 81

def content_classes
  self["content_classes"].map(&:constantize)
end