SassBool

Swift
public final class SassBool: SassValue

A Sass boolean value.

You cannot create instances of this type: use SassConstants.true and SassConstants.false instead.


Topics

Properties

var value: Bool

The value of the boolean.

Declaration
Swift
public let value: Bool

var isTruthy: Bool

Sass considers all values except null and false to be “truthy”, meaning your function should almost always be checking this property instead of trying to downcast to SassBool.

Declaration
Swift
public override var isTruthy: Bool { get }

Misc

static func ==(lhs: SassBool, rhs: SassBool) -> Bool

Boolean equality.

Declaration
Swift
public static func == (lhs: SassBool, rhs: SassBool) -> Bool

func hash(into: inout Hasher)

Hash the boolean value.

Declaration
Swift
public override func hash(into hasher: inout Hasher)

func accept<V, R>(visitor: V) -> R

Take part in the SassValueVisitor protocol.

Declaration
Swift
public override func accept<V, R>(visitor: V) throws -> R
where V: SassValueVisitor, R == V.ReturnType

var description: String

A short description of the value.

Declaration
Swift
public override var description: String { get }