def matches_content?(element)
      return true if @content.nil?

      case @content
      when String
        element.content == @content
      when Regexp
        element.content =~ @content
      end
    end
def matches_content?(element)
      return true if @content.nil?

      case @content
      when String
        element.content == @content
      when Regexp
        element.content =~ @content
      end
    end
Answers whether or not +element+ matches the content set by {#with_content}.

 @param [Nokogiri::XML::Node]  element   The element to be tested.

 @return [Boolean]