From fa97f657628ac32dba9af26cd693f9924b635d3b Mon Sep 17 00:00:00 2001 From: digitalMoksha Date: Tue, 4 Jun 2024 14:53:32 -0500 Subject: [PATCH] Fix example in README --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0728e38..86f85bd 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,11 @@ Here's an example which rewrites the `href` attribute on `a` and the `src` attri ```ruby class MatchAttribute - SELECTOR = Selma::Selector(match_element: %(a[href^="http:"], img[src^="http:"]")) + SELECTOR = Selma::Selector.new(match_element: %(a[href^="http:"], img[src^="http:"]")) + + def selector + SELECTOR + end def handle_element(element) if element.tag_name == "a"