Skip to content

Commit

Permalink
actually, the origin used an s instead of a z
Browse files Browse the repository at this point in the history
  • Loading branch information
audy committed Oct 16, 2011
1 parent 8891a9b commit ee6db85
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/memetron/memes.rb
Expand Up @@ -32,6 +32,6 @@ module Memetron
:bear_grillis => /(.*) better drink my own piss/i,

# I can haz cheeseburger
:i_can_haz => /I can haz (.*)/i
:i_can_haz => /I can ha[zs] (.*)/i
}
end
10 changes: 8 additions & 2 deletions readme.md
@@ -1,6 +1,8 @@
# Memetron 5000

An attempt to replace Reddit with regular expressions.
Recognize common internet memes using regular expressions.

## How

```ruby
require 'lib/memetron'
Expand All @@ -9,5 +11,9 @@ matcher = Memetron::Matcher.new

matcher.match("North Korea is Best Korea") #=> :is_best

matcher.parse("North Korea is Best Korea") #=> ['North', 'Korea', 'Korea']
mather.parse("Wrote a Ruby library, better drink my own piss") #=> ["Wrote a Ruby library,"]
```

## Why?

For the lulz.
4 changes: 2 additions & 2 deletions spec/memetron/matcher_spec.rb
Expand Up @@ -158,8 +158,8 @@
subject.match("I can haz Ruby library?").should == :i_can_haz
end

it "should not work with an s instead of a z" do
subject.match("I can has Ruby library?").should be_nil
it "should work with either has or haz" do
subject.match("I can has Ruby library?").should == :i_can_haz
end

it "is parsed" do
Expand Down

0 comments on commit ee6db85

Please sign in to comment.