Created
September 5, 2011 08:03
-
-
Save paneq/1194364 to your computer and use it in GitHub Desktop.
Methods for module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Mailing | |
singleton_class.class_eval do | |
attr_accessor :engine | |
delegate :add, :clear, :each, :deliver, :to => :engine | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Mailing | |
class << self | |
attr_accessor :engine | |
delegate :add, :clear, :each, :deliver, :to => :engine | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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