Class: Sass::Script::Value::ArgList
- Inherits:
- List show all
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/value/arg_list.rb
Overview
A SassScript object representing a variable argument list. This works just like a normal list, but can also contain keyword arguments.
The keyword arguments attached to this list are unused except when this is passed as a glob argument to a function or mixin.
Instance Attribute Summary (collapse)
- - (Boolean) keywords_accessed
Whether #keywords has been accessed.
Attributes inherited from List
Attributes inherited from Base
#options, #source_range, #value
Instance Method Summary (collapse)
- - (ArgList) initialize(value, keywords, separator) constructor
Creates a new argument list.
- - (NormalizedMap<Value>) keywords
The keyword arguments attached to this list.
Methods inherited from List
#eq, #hash, #inspect, #options=, #to_h, #to_s, #to_sass
Methods inherited from Base
#==, #_perform, #assert_int!, #div, #eq, #eql?, #hash, #inspect, #minus, #neq, #null?, #plus, #separator, #single_eq, #to_a, #to_bool, #to_h, #to_i, #to_s, #unary_div, #unary_minus, #unary_not, #unary_plus
Constructor Details
- (ArgList) initialize(value, keywords, separator)
Creates a new argument list.
19 20 21 22 23 24 25 26 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/value/arg_list.rb', line 19
def initialize(value, keywords, separator)
super(value, separator)
if keywords.is_a?(Sass::Util::NormalizedMap)
@keywords = keywords
else
@keywords = Sass::Util::NormalizedMap.new(keywords)
end
end |
Instance Attribute Details
- (Boolean) keywords_accessed
Whether #keywords has been accessed. If so, we assume that all keywords were valid for the function that created this ArgList.
12 13 14 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/value/arg_list.rb', line 12
def keywords_accessed
@keywords_accessed
end |
Instance Method Details
- (NormalizedMap<Value>) keywords
The keyword arguments attached to this list.
31 32 33 34 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/value/arg_list.rb', line 31
def keywords
@keywords_accessed = true
@keywords
end |