Skip to content
Browse files

Cleaned up some engine-related code in Environment

  • Loading branch information...
1 parent 997d692 commit 1c727ea33b934bce4c9792c4309f6d17a06a4159 @ddemaree committed Feb 17, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/soundwave/environment.rb
View
10 lib/soundwave/environment.rb
@@ -15,12 +15,9 @@ def initialize(root="./")
@output_dir ||= @root_dir.join("_site")
@data_dir ||= @root_dir.join("_data")
- # TODO: Nicer interface around engines?
- @engines = {
- ".mustache" => Soundwave::MustacheTemplate,
- ".scss" => Tilt::ScssTemplate,
- ".erb" => Tilt::ERBTemplate
- }
+ register_engine ".mustache", Soundwave::MustacheTemplate
+ register_engine ".scss", Tilt::ScssTemplate
+ register_engine ".erb", Tilt::ERBTemplate
end
def site_data
@@ -37,6 +34,7 @@ def engines(ext)
end
def register_engine(ext, engine)
+ @engines ||= {}
@engines[ext] = engine
end

0 comments on commit 1c727ea

Please sign in to comment.
Something went wrong with that request. Please try again.