class Sass::Selector::Attribute

An attribute selector (e.g. ‘[href^=“http://”]`).

def initialize(name, namespace, operator, value)

Parameters:
  • value (Array) -- See \{#value}
  • operator (String) -- The matching operator, e.g. `"="` or `"^="`
  • namespace (Array, nil) -- See \{#namespace}
  • name (Array) -- The attribute name
def initialize(name, namespace, operator, value)
  @name = name
  @namespace = namespace
  @operator = operator
  @value = value
end

def to_a

Other tags:
    See: Selector#to_a -
def to_a
  res = ["["]
  res.concat(@namespace) << "|" if @namespace
  res.concat @name
  (res << @operator).concat @value if @value
  res << "]"
end