class Sass::Selector::Attribute
An attribute selector (e.g. ‘[href^=“http://”]`).
Attributes
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]
Public Class Methods
Source
# File lib/sass/selector.rb, line 303 def initialize(name, namespace, operator, value, flags) @name = name @namespace = namespace @operator = operator @value = value @flags = flags end
@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}
Public Instance Methods
Source
# File lib/sass/selector.rb, line 322 def specificity SPECIFICITY_BASE end
Source
# File lib/sass/selector.rb, line 312 def to_s(opts = {}) res = "[" res << @namespace << "|" if @namespace res << @name res << @operator << @value if @value res << " " << @flags if @flags res << "]" end
@see Selector#to_s