Tilt::LessTemplate
# File lib/less/rails/template_handlers.rb, line 14 def evaluate(scope, locals, &block) @output ||= begin Less.Parser['scope'] = scope parser = ::Less::Parser.new config_to_less_parser_options(scope) engine = parser.parse(data) engine.to_css config_to_css_options(scope) end end
# File lib/less/rails/template_handlers.rb, line 40 def config_from_rails(scope) scope.environment.context_class.less_config end
# File lib/less/rails/template_handlers.rb, line 36 def config_paths(scope) config_from_rails(scope)[:paths] end
# File lib/less/rails/template_handlers.rb, line 32 def config_to_css_options(scope) Hash[config_from_rails(scope).each.to_a].slice *TO_CSS_KEYS end
# File lib/less/rails/template_handlers.rb, line 25 def config_to_less_parser_options(scope) paths = config_paths(scope) + scope.environment.paths local_path = scope.pathname.dirname paths += [local_path] unless paths.include? local_path {:filename => eval_file, :line => line, :paths => paths, :dumpLineNumbers => config_from_rails(scope).line_numbers} end
Generated with the Darkfish Rdoc Generator 2.