Class: Sass::Script::ArgList
- Defined in:
- lib/sass/script/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
Attributes inherited from Literal
Attributes inherited from Node
Instance Method Summary collapse
- #_perform(environment) protected
- #children
- #deep_copy
-
#initialize(value, keywords, separator) ⇒ ArgList
constructor
Creates a new argument list.
-
#keywords ⇒ Hash<String, Literal>
The keyword arguments attached to this list.
Methods inherited from List
#eq, #inspect, #to_s, #to_sass
Methods inherited from Literal
#==, #assert_int!, #comma, #div, #eq, #inspect, #minus, #neq, #null?, #options, #plus, #single_eq, #space, #to_a, #to_bool, #to_i, #to_s, #unary_div, #unary_minus, #unary_not, #unary_plus
Methods inherited from Node
#dasherize, #opts, #perform, #to_sass
Constructor Details
#initialize(value, keywords, separator) ⇒ ArgList
Creates a new argument list.
19 20 21 22 |
# File 'lib/sass/script/arg_list.rb', line 19
def initialize(value, keywords, separator)
super(value, separator)
@keywords = keywords
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/arg_list.rb', line 12
def keywords_accessed
@keywords_accessed
end
|
Instance Method Details
#_perform(environment) (protected)
48 49 50 |
# File 'lib/sass/script/arg_list.rb', line 48
def _perform(environment)
self
end
|
#children
33 34 35 |
# File 'lib/sass/script/arg_list.rb', line 33
def children
super + @keywords.values
end
|
#deep_copy
38 39 40 41 42 43 |
# File 'lib/sass/script/arg_list.rb', line 38
def deep_copy
node = super
node.instance_variable_set('@keywords',
Sass::Util.map_hash(@keywords) {|k, v| [k, v.deep_copy]})
node
end
|