# File lib/compass/sass_extensions/functions/gradient_support.rb, line 10 def initialize(color, stop = nil) unless Sass::Script::Color === color || Sass::Script::Funcall === color raise Sass::SyntaxError, "Expected a color. Got: #{color}" end if stop && !stop.is_a?(Sass::Script::Number) raise Sass::SyntaxError, "Expected a number. Got: #{stop}" end self.color, self.stop = color, stop end
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 7 def children [color, stop].compact end
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 19 def inspect to_s end
# File lib/compass/sass_extensions/functions/gradient_support.rb, line 22 def to_s(options = self.options) s = color.inspect.dup if stop s << " " if stop.unitless? s << stop.times(Sass::Script::Number.new(100, ["%"])).inspect else s << stop.inspect end end s end
Generated with the Darkfish Rdoc Generator 2.