SassMap
A Sass map value.
Sass maps are Dictionary
Dictionary
-like collections. The keys can be any kind of
SassValue
.
When a map is viewed as a Sass list then the list is of two-element lists, one for each key-value pair in the map. The pairs are in no particular order.
Topics
Initializers
init([SassValue : SassValue])
init([SassValue : SassValue])
Create a SassMap
from an existing Dictionary
Dictionary
.
Declaration
init<S>(uniqueKeysWithValues: S)
init<S>(uniqueKeysWithValues: S)
Properties
var dictionary: [SassValue : SassValue]
var dictionary: [SassValue : SassValue]
var separator: SassList.Separator
var separator: SassList.Separator
The list separator used by this value when viewed as a list.
Declaration
public override var separator: SassList.Separator { get }
var listCount: Int
var listCount: Int
The number of values in this value viewed as a list.
Declaration
public override var listCount: Int { get }
Access
subscript(key: SassValue) -> SassValue?
subscript(key: SassValue) -> SassValue?
func valueAt(sassIndex: SassValue) -> SassValue
func valueAt(sassIndex: SassValue) -> SassValue
this method uses sassIndex
to numerically index into the list representation of
this map. To access the map via its keys use subscript(_:)
or dictionary
directly.
Declaration
Misc
static func ==(lhs: SassMap, rhs: SassMap) -> Bool
static func ==(lhs: SassMap, rhs: SassMap) -> Bool
func hash(into: inout Hasher)
func hash(into: inout Hasher)
func makeIterator() -> AnyIterator<SassValue>
func makeIterator() -> AnyIterator<SassValue>
An iterator for contents of the map. Each element of the iteration is a SassList
containing the key and value SassValue
s for one entry in the map.
Declaration
public override func makeIterator() -> AnyIterator<SassValue>
func accept<V, R>(visitor: V) -> R
func accept<V, R>(visitor: V) -> R
Call the corresponding method of visitor
against this object.
Declaration
public override func accept<V, R>(visitor: V) throws -> R
where V: SassValueVisitor, R == V.ReturnType
var description: String
var description: String