Class: Sass::Value::ArgumentList
- Defined in:
- lib/sass/value/argument_list.rb
Overview
Sass’s argument list type.
An argument list comes from a rest argument. It’s distinct from a normal List in that it may contain a keyword map as well as the positional arguments.
Instance Attribute Summary
Attributes inherited from List
Instance Method Summary collapse
-
#initialize(contents = [], keywords = {}, separator = ',') ⇒ ArgumentList
constructor
A new instance of ArgumentList.
- #keywords ⇒ Hash<::String, Value>
Methods inherited from List
#==, #assert_map, #at, #bracketed?, #hash, #to_map
Methods included from Sass::Value
#[], #assert_boolean, #assert_calculation, #assert_color, #assert_function, #assert_map, #assert_number, #assert_string, #at, #bracketed?, #eql?, #sass_index_to_array_index, #separator, #to_a, #to_bool, #to_map, #to_nil
Constructor Details
#initialize(contents = [], keywords = {}, separator = ',') ⇒ ArgumentList
Returns a new instance of ArgumentList.
15 16 17 18 19 20 21 |
# File 'lib/sass/value/argument_list.rb', line 15 def initialize(contents = [], keywords = {}, separator = ',') super(contents, separator: separator) @id = 0 @keywords_accessed = false @keywords = keywords.transform_keys(&:to_s).freeze end |
Instance Method Details
#keywords ⇒ Hash<::String, Value>
24 25 26 27 |
# File 'lib/sass/value/argument_list.rb', line 24 def keywords @keywords_accessed = true @keywords end |