lib/sass/selector/simple_sequence.rb in haml-edge-2.3.228 vs lib/sass/selector/simple_sequence.rb in haml-edge-2.3.229

- old
+ new

@@ -97,9 +97,18 @@ sel.unify(sseq) end SimpleSequence.new(sseq) end + # Returns whether or not this selector matches all elements + # that the given selector matches (as well as possibly more). + # + # @example + # (.foo).superselector?(.foo.bar) #=> true + # (.foo).superselector?(.bar) #=> false + # + # @param sseq [SimpleSequence] + # @return [Boolean] def superselector?(sseq) (base.nil? || base.eql?(sseq.base)) && rest.subset?(sseq.rest) end # @see Simple#to_a