An attribute selector (e.g. `[href^="http://"]`).
Flags for the attribute selector (e.g. `i`).
@return [Array<String, Sass::Script::Node>]
The attribute name.
@return [Array<String, Sass::Script::Node>]
The attribute namespace. `nil` means the default namespace, `[""]` means no namespace, `["*"]` means any namespace.
@return [Array<String, Sass::Script::Node>, nil]
The matching operator, e.g. `"="` or `"^="`.
@return [String]
The right-hand side of the operator.
@return [Array<String, Sass::Script::Node>]
@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} @param value [Array<String, Sass::Script::Node>] See {#flags}
# File lib/sass/selector.rb, line 322 def initialize(name, namespace, operator, value, flags) @name = name @namespace = namespace @operator = operator @value = value @flags = flags end
@see Sass::Selector::AbstractSequence#specificity
# File lib/sass/selector.rb, line 341 def specificity SPECIFICITY_BASE end
@see Selector#to_a
# File lib/sass/selector.rb, line 331 def to_a res = ["["] res.concat(@namespace) << "|" if @namespace res.concat @name (res << @operator).concat @value if @value (res << " ").concat @flags if @flags res << "]" end