Skip to content

Instantly share code, notes, and snippets.

@christos
Created June 12, 2009 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christos/128670 to your computer and use it in GitHub Desktop.
Save christos/128670 to your computer and use it in GitHub Desktop.
# mailer_twitterable/lib/supercoco9/mailer_twitterable.rb
module Supercoco9
module MailerTwitterable
def self.included(base)
base.extend ClassMethods
base.include InstanceMethods
end
module ClassMethods
def deliver_with_twitterable!(mail=@mail)
# ... your code here
deliver_without_twitterable!
end
alias_method_chain :deliver!, :twitterable
end
module InstanceMethods
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment