From 5d1c87ff4a156ab006c053d614696c848f6712a0 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Tue, 26 Jan 2010 23:08:52 -0800 Subject: [PATCH] [Sass] Add MixinNode#to_sass. --- lib/sass/tree/mixin_node.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/sass/tree/mixin_node.rb b/lib/sass/tree/mixin_node.rb index a7494fef..887e8cd8 100644 --- a/lib/sass/tree/mixin_node.rb +++ b/lib/sass/tree/mixin_node.rb @@ -20,6 +20,12 @@ module Sass::Tree _cssize(parent) # Pass on the parent even if it's not a MixinNode end + # @see Node#to_sass + def to_sass(tabs, opts = {}) + args = '(' + @args.map {|a| a.to_sass}.join(", ") + ')' unless @args.empty? + "#{' ' * tabs}+#{@name}#{args}" + end + protected # @see Node#_cssize