An attribute selector (e.g. `[href^=“http://”]`).
Flags for the attribute selector (e.g. `i`).
@return [String]
The attribute name.
@return [Array<String, Sass::Script::Tree::Node>]
The attribute namespace. `nil` means the default namespace, `“”` means no namespace, `“*”` means any namespace.
@return [String, nil]
The matching operator, e.g. `“=”` or `“^=”`.
@return [String]
The right-hand side of the operator.
@return [String]
@param name [String] The attribute name @param namespace [String, nil] See {#namespace} @param operator [String] The matching operator, e.g. `“=”` or `“^=”` @param value [String] See {#value} @param flags [String] See {#flags} @comment
rubocop:disable ParameterLists
# File lib/sass/selector.rb, line 301 def initialize(name, namespace, operator, value, flags) # rubocop:enable ParameterLists @name = name @namespace = namespace @operator = operator @value = value @flags = flags end
@see Sass::Selector::AbstractSequence#specificity
# File lib/sass/selector.rb, line 321 def specificity SPECIFICITY_BASE end
@see Selector#to_s
# File lib/sass/selector.rb, line 311 def to_s res = "[" res << @namespace << "|" if @namespace res << @name res << @operator << @value if @value res << " " << @flags if @flags res << "]" end