Make Site.source and Site.dest "immutable"

This commit is contained in:
Parker Moore 2014-08-26 23:20:01 -07:00
parent bd72265e74
commit 314dce62cf
1 changed files with 4 additions and 3 deletions

View File

@ -3,8 +3,9 @@ require 'csv'
module Jekyll
class Site
attr_reader :source, :dest
attr_accessor :config, :layouts, :posts, :pages, :static_files,
:exclude, :include, :source, :dest, :lsi, :highlighter,
:exclude, :include, :lsi, :highlighter,
:permalink_style, :time, :future, :unpublished, :safe, :plugins, :limit_posts,
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems,
:plugin_manager
@ -22,8 +23,8 @@ module Jekyll
self.send("#{opt}=", config[opt])
end
self.source = File.expand_path(config['source'])
self.dest = File.expand_path(config['destination'])
@source = File.expand_path(config['source']).freeze
@dest = File.expand_path(config['destination']).freeze
self.permalink_style = config['permalink'].to_sym
self.plugin_manager = Jekyll::PluginManager.new(self)