Class | Sass::Selector::Attribute
In: | lib/sass/selector.rb
Parent: | Simple

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

### Methods

new to_a

### Attributes

name | [R] | The attribute name. @return [Array<String, Sass::Script::Node>]
namespace | [R] | The attribute namespace. `nil` means the default namespace, `[""]` means no namespace, `["*"]` means any namespace. @return [Array<String, Sass::Script::Node>, nil]
operator | [R] | The matching operator, e.g. `"="` or `"^="`. @return [String]
value | [R] | The right-hand side of the operator. @return [Array<String, Sass::Script::Node>]

### Public Class methods

new(name, namespace, operator, value)

@param name [Array<String, Sass::Script::Node>] The attribute name @param namespace [Array<String, Sass::Script::Node>, nil] See \{namespace} @param operator [String] The matching operator, e.g. `"="` or `"^="` @param value [Array<String, Sass::Script::Node>] See \{value}

[Source]

         # File lib/sass/selector.rb, line 263
    263:       def initialize(name, namespace, operator, value)
    264:         @name = name
    265:         @namespace = namespace
    266:         @operator = operator
    267:         @value = value
    268:       end

### Public Instance methods

to_a()

@see Selector#to_a

[Source]

         # File lib/sass/selector.rb, line 271
    271:       def to_a
    272:         res = ["["]
    273:         res.concat(@namespace) << "|" if @namespace
    274:         res.concat @name
    275:         (res << @operator).concat @value if @value
    276:         res << "]"
    277:       end

[Validate]