Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class AClassicPattern < ActiveRecord::Migration
def self.up
begin
try
rescue
raise ObiWan, "You're my only hope."
end
end
def self.down
raise NotImplementedError, "There is no undo"
end
def self.try
raise NotImplementedError, "Do or do not. There is no 'try.'"
ghost = class << obj; self; end
ghost.remove_method :try
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment