gems.sass-3.5.5.lib.sass.script.tree.literal.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sass-maven-plugin Show documentation
Show all versions of sass-maven-plugin Show documentation
A Maven Plugin that compiles Sass files.
module Sass::Script::Tree
# The parse tree node for a literal scalar value. This wraps an instance of
# {Sass::Script::Value::Base}.
#
# List literals should use {ListLiteral} instead.
class Literal < Node
# The wrapped value.
#
# @return [Sass::Script::Value::Base]
attr_reader :value
# Creates a new literal value.
#
# @param value [Sass::Script::Value::Base]
# @see #value
def initialize(value)
@value = value
end
# @see Node#children
def children; []; end
# @see Node#to_sass
def to_sass(opts = {}); value.to_sass(opts); end
# @see Node#deep_copy
def deep_copy; dup; end
# @see Node#options=
def options=(options)
value.options = options
end
def inspect
value.inspect
end
def force_division!
value.original = nil if value.is_a?(Sass::Script::Value::Number)
end
protected
def _perform(environment)
value.source_range = source_range
value
end
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy