lib/sass/script/node.rb in haml-edge-2.3.186 vs lib/sass/script/node.rb in haml-edge-2.3.187
- old
+ new
@@ -72,14 +72,23 @@
end
# Returns the text of this SassScript expression.
#
# @return [String]
- def to_sass
+ def to_sass(opts = {})
raise NotImplementedError.new("All subclasses of Sass::Script::Node must override #to_sass.")
end
protected
+
+ # Converts underscores to dashes if the :dasherize option is set.
+ def dasherize(s, opts)
+ if opts[:dasherize]
+ s.gsub(/_/,'-')
+ else
+ s
+ end
+ end
# Evaluates this node.
#
# @param environment [Sass::Environment] The environment in which to evaluate the SassScript
# @return [Literal] The SassScript object that is the value of the SassScript