Allow frameworks more control over specifying where the templates and stylesheets are located.

This commit is contained in:
Chris Eppstein 2009-01-01 18:06:37 -08:00
parent 03156b7c72
commit b021b77894

View File

@ -3,16 +3,13 @@ module Compass
ALL = []
class Framework
attr_accessor :name
attr_accessor :path
def initialize(name, path)
self.name = name
self.path = path
end
def template_directory
File.join(self.path, 'templates')
end
def stylesheets_directory
File.join(self.path, 'stylesheets')
attr_accessor :templates_directory, :stylesheets_directory
def initialize(name, *arguments)
options = arguments.last.is_a?(Hash) ? arguments.pop : {}
path = options[:path] || arguments.shift
@name = name
@templates_directory = options[:templates_directory] || File.join(path, 'templates')
@stylesheets_directory = options[:stylesheets_directory] || File.join(self.path, 'stylesheets')
end
end
def register(name, path)