lib/sass/selector/abstract_sequence.rb in sass-3.2.0.alpha.35 vs lib/sass/selector/abstract_sequence.rb in sass-3.2.0.alpha.49
- old
+ new
@@ -55,8 +55,15 @@
# @return [Boolean] Whether or not this is equal to `other`
def eql?(other)
other.class == self.class && other.hash == self.hash && _eql?(other)
end
alias_method :==, :eql?
+
+ # Whether or not this selector sequence contains a placeholder selector.
+ # Checks recursively.
+ def has_placeholder?
+ @has_placeholder ||=
+ members.any? {|m| m.is_a?(AbstractSequence) ? m.has_placeholder? : m.is_a?(Placeholder)}
+ end
end
end
end