class Sass::Value::Map
Sass’s map type.
def ==(other)
def ==(other) (other.is_a?(Sass::Value::Map) && other.contents == contents) || (contents.empty? && other.is_a?(Sass::Value::List) && other.to_a.empty?) end
def assert_map(_name = nil)
def assert_map(_name = nil) self end
def at(index)
def at(index) if index.is_a? Numeric index = index.floor index = to_a.length + index if index.negative? return nil if index.negative? || index >= to_a.length to_a[index] else contents[index] end end
def hash
def hash @hash ||= contents.hash end
def initialize(contents = {})
def initialize(contents = {}) @contents = contents.freeze end
def separator
def separator contents.empty? ? nil : ',' end
def to_a
def to_a contents.to_a.map { |entry| Sass::Value::List.new(entry, separator: ' ') } end
def to_a_length
def to_a_length contents.length end
def to_map
def to_map self end