Skip to content

Instantly share code, notes, and snippets.

View bastos's full-sized avatar
:shipit:
Shipping something

Tiago Bastos bastos

:shipit:
Shipping something
View GitHub Profile
@bastos
bastos / pattern_matching.rb
Created September 18, 2008 05:28
Pattern Matching For Ruby Modules
# A not Nil or Unbound thing representation
class Unbound; end
module PatternMatching
def self.included(base)
base.send(:extend, PMMethods)
end
module PMMethods
attr_reader :pm_methods, :pattern
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#cccccc";
static const char normbgcolor[] = "#cccccc";
static const char normfgcolor[] = "#000000";
static const char selbordercolor[] = "#333333";
static const char selbgcolor[] = "#333333";
static const char selfgcolor[] = "#ffffff";
git archive --format=tar --prefix=prices/ HEAD | (cd /home/django/apps/ && tar xf -)
require 'camping'
Camping.goes :E
def say_something
prefixo = ["Meu, ","No mercado vertical mano","Lá em Sampa meu,","Aê Fio","Po meu", "Um amigo chegou pra mim e falou Edu,", "Ahhh, de boa?", "Tá me tirando, fio?"]
pessoas = ["Adóbe","Mina", "Mano"]
adjetivos = ["paluda", "de boa",""]
verbos = ["usaaa","faz","tem"]
coisas = ["flex","jruby","flash","ruby EN rails","select WALL"]