Skip to content

Instantly share code, notes, and snippets.

@paneq
Created September 5, 2011 08:03
Show Gist options
  • Save paneq/1194364 to your computer and use it in GitHub Desktop.
Save paneq/1194364 to your computer and use it in GitHub Desktop.
Methods for module
module Mailing
singleton_class.class_eval do
attr_accessor :engine
delegate :add, :clear, :each, :deliver, :to => :engine
end
end
module Mailing
class << self
attr_accessor :engine
delegate :add, :clear, :each, :deliver, :to => :engine
end
end
module Mailing
attr_accessor :engine
delegate :add, :clear, :each, :deliver, :to => :engine
extend(self)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment