class SassC::Script::Value
def ==(other)
def ==(other) self.class == other.class && value == other.value end
def _perform(environment)
-
(Value)
- This value
Parameters:
-
environment
(Sass::Environment
) -- The environment in which to evaluate the SassScript
def _perform(environment) self end
def assert_int!; to_i; end
-
(SassC::SyntaxError)
- if this value isn't an integer
def assert_int!; to_i; end
def bracketed
Whether the value is surrounded by square brackets. For non-list values,
def bracketed false end
def eql?(other)
def eql?(other) self == other end
def hash
Returns the hash code of this value. Two objects' hash codes should be
def hash value.hash end
def initialize(value = nil)
def initialize(value = nil) value.freeze unless value.nil? || value == true || value == false @value = value @options = nil end
def inspect
def inspect value.inspect end
def null?
def null? false end
def options
Raises SassC::SyntaxError if the value was created
Returns the options hash for this node.
def options return @options if @options raise SassC::SyntaxError.new("The #options attribute is not set on this #{self.class}. This error is probably occurring because #to_s was called on this value within a custom Sass function without first setting the #options attribute.") end
def separator
Returns the separator for this value. For non-list-like values or the
def separator nil end
def to_a
Returns the value of this Value as an array.
def to_a [self] end
def to_bool
def to_bool true end
def to_h
-
(SassC::SyntaxError)
- if this value doesn't have a hash representation
Returns:
-
(Hash
- This value as a hash)
def to_h raise SassC::SyntaxError.new("#{inspect} is not a map.") end
def to_i
Returns the integer value of this value.
def to_i raise SassC::SyntaxError.new("#{inspect} is not an integer.") end
def to_s(opts = {})
-
(String)
-
def to_s(opts = {}) SassC::Util.abstract(self) end
def with_contents(contents, separator: self.separator, bracketed: self.bracketed)
-
(Sass::Script::Value::List)
-
Parameters:
-
bracketed
(Boolean
) -- Whether the new list is bracketed. Defaults to \{#bracketed}. -
separator
(Symbol
) -- The separator of the new list. Defaults to \{#separator}. -
contents
(Array
) -- The contents of the new list.
def with_contents(contents, separator: self.separator, bracketed: self.bracketed) SassC::Script::Value::List.new(contents, separator: separator, bracketed: bracketed) end