Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Library for defining, matching and parsing internet "memes"

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .rspec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 readme.md
readme.md

Memetron

Identify and parse internet "memes" in Ruby.

How

require 'memetron'

Memetron::Matcher.match('A wild Ruby library appears')
# => [Memetron::Pokemon, 'Ruby Library']

Define memes using the DSL

module Memetron
  class SeanBean < Meme
    # define meme as a regular expression
    matcher /Prepare yourself,? (.*) are coming/i

    # provide some test cases
    should_match "prepare yourself, the automatically generated memes are coming"
    and_return "the automatically generated memes"

    should_not_match "this isn't an example of the Sean Bean meme"
  end
end

Contributing Memes

Submit a pull request with your meme and at least one positive example.

Why?

For the lulz.

Something went wrong with that request. Please try again.