Sha256: 5fc454af10f1f3de2d6e386834b5b51cc213460667c2f7774cb4e8f6ea1d71c2

Contents?: true

Size: 828 Bytes

Versions: 18

Compression:

Stored size: 828 Bytes

Contents

require 'mlist/manager/notifier'

module MList
  
  # The interface of list managers.
  #
  # A module is provided instead of a base class to allow implementors to
  # subclass whatever they like. Practically speaking, they can create an
  # ActiveRecord subclass.
  #
  module Manager
    
    # Answers an enumeration of MList::List implementations to which the given
    # email should be published.
    #
    def lists(email)
      raise 'implement in your list manager'
    end
    
    # Answers the MList::Manager::Notifier of this list manager. Includers of
    # this module may initialize the @notifier instance variable with their
    # own implementation/subclass to generate custom content for the different
    # notices.
    #
    def notifier
      @notifier ||= MList::Manager::Notifier.new
    end
  end
  
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
aiwilliams-mlist-0.1.5 lib/mlist/manager.rb
aiwilliams-mlist-0.1.6 lib/mlist/manager.rb
aiwilliams-mlist-0.1.7 lib/mlist/manager.rb
aiwilliams-mlist-0.1.8 lib/mlist/manager.rb
mlist-0.1.23 lib/mlist/manager.rb
mlist-0.1.22 lib/mlist/manager.rb
mlist-0.1.21 lib/mlist/manager.rb
mlist-0.1.20 lib/mlist/manager.rb
mlist-0.1.19 lib/mlist/manager.rb
mlist-0.1.18 lib/mlist/manager.rb
mlist-0.1.17 lib/mlist/manager.rb
mlist-0.1.16 lib/mlist/manager.rb
mlist-0.1.14 lib/mlist/manager.rb
mlist-0.1.13 lib/mlist/manager.rb
mlist-0.1.12 lib/mlist/manager.rb
mlist-0.1.11 lib/mlist/manager.rb
mlist-0.1.10 lib/mlist/manager.rb
mlist-0.1.9 lib/mlist/manager.rb