Class: Mail2WikiHelper
- Inherits:
-
Object
- Object
- Mail2WikiHelper
- Defined in:
- lib/helpers/mail2wiki-helper.rb
Constant Summary collapse
- DEFAULT_SETTINGS =
{ :server => 'imap.hermes.cam.ac.uk', :username => 'tamc2', :password => 'missing_a_password', :mailbox => 'test', :check_event => :hour, :subject_regexp => /.*/, :keyword => 'PutInWiki' }
Instance Method Summary collapse
-
#initialize(wiki, settings = {}) ⇒ Mail2WikiHelper
constructor
A new instance of Mail2WikiHelper.
Constructor Details
#initialize(wiki, settings = {}) ⇒ Mail2WikiHelper
Returns a new instance of Mail2WikiHelper.
44 45 46 47 48 49 |
# File 'lib/helpers/mail2wiki-helper.rb', line 44 def initialize( wiki, settings = {} ) @settings = DEFAULT_SETTINGS.merge( settings ) @wiki = wiki check_mailbox @wiki.watch_for(@settings[:check_event]) { check_mailbox } end |