Skip to content

Commit

Permalink
Fix example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalmoksha committed Jun 4, 2024
1 parent b71ad75 commit fa97f65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fa97f65

Please sign in to comment.