Allow frameworks more control over specifying where the templates and stylesheets are located.
This commit is contained in:
parent
03156b7c72
commit
b021b77894
@ -3,16 +3,13 @@ module Compass
|
|||||||
ALL = []
|
ALL = []
|
||||||
class Framework
|
class Framework
|
||||||
attr_accessor :name
|
attr_accessor :name
|
||||||
attr_accessor :path
|
attr_accessor :templates_directory, :stylesheets_directory
|
||||||
def initialize(name, path)
|
def initialize(name, *arguments)
|
||||||
self.name = name
|
options = arguments.last.is_a?(Hash) ? arguments.pop : {}
|
||||||
self.path = path
|
path = options[:path] || arguments.shift
|
||||||
end
|
@name = name
|
||||||
def template_directory
|
@templates_directory = options[:templates_directory] || File.join(path, 'templates')
|
||||||
File.join(self.path, 'templates')
|
@stylesheets_directory = options[:stylesheets_directory] || File.join(self.path, 'stylesheets')
|
||||||
end
|
|
||||||
def stylesheets_directory
|
|
||||||
File.join(self.path, 'stylesheets')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def register(name, path)
|
def register(name, path)
|
||||||
|
Loading…
Reference in New Issue
Block a user