Class: Sass::Script::Value::ArgList
- Defined in:
- 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
-
#keywords_accessed ⇒ Boolean
Whether #keywords has been accessed.
Attributes inherited from List
#bracketed, #separator, #value
Attributes inherited from Base
#options, #source_range, #value
Instance Method Summary collapse
-
#initialize(value, keywords, separator) ⇒ ArgList
constructor
Creates a new argument list.
-
#keywords ⇒ NormalizedMap<Value>
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!, #bracketed, #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, #with_contents
Constructor Details
#initialize(value, keywords, separator) ⇒ ArgList
Creates a new argument list.
19 20 21 22 23 24 25 26 |
# File 'lib/sass/script/value/arg_list.rb', line 19
def initialize(value, keywords, separator)
super(value, separator: separator)
if keywords.is_a?(Sass::Util::NormalizedMap)
@keywords = keywords
else
@keywords = Sass::Util::NormalizedMap.new(keywords)
end
end
|
Instance Attribute Details
#keywords_accessed ⇒ Boolean
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 'lib/sass/script/value/arg_list.rb', line 12
def keywords_accessed
@keywords_accessed
end
|
Instance Method Details
#keywords ⇒ NormalizedMap<Value>
The keyword arguments attached to this list.
31 32 33 34 |
# File 'lib/sass/script/value/arg_list.rb', line 31
def keywords
@keywords_accessed = true
@keywords
end
|