The context in which methods in {Script::Functions} are evaluated. That means that all instance methods of {EvaluationContext} are available to use in functions.
Asserts that the type of a given SassScript value is the expected type (designated by a symbol).
Valid types are `:Bool`, `:Color`, `:Number`, and `:String`. Note that `:String` will match both double-quoted strings and unquoted identifiers.
@example
assert_type value, :String assert_type value, :Number
@param value [Sass::Script::Literal] A SassScript value @param type [Symbol] The name of the type the value is expected to be @param name [String, Symbol, nil] The name of the argument.
# File lib/sass/script/functions.rb, line 340 def assert_type(value, type, name = nil) return if value.is_a?(Sass::Script.const_get(type)) err = "#{value.inspect} is not a #{type.to_s.downcase}" err = "$#{name.to_s.gsub('_', '-')}: " + err if name raise ArgumentError.new(err) end
Generated with the Darkfish Rdoc Generator 2.