Class: Tape::Adapters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/tape/adapters/base.rb

Direct Known Subclasses

ActionMailer::Maildir, ActionMailer::Test, Pony

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/tape/adapters/base.rb', line 9

def initialize(options)
  self.options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/tape/adapters/base.rb', line 7

def options
  @options
end

Instance Method Details

#allObject



13
14
15
# File 'lib/tape/adapters/base.rb', line 13

def all
  raise "Not implemented"
end

#by_recipient(address) ⇒ Object



26
27
28
29
30
# File 'lib/tape/adapters/base.rb', line 26

def by_recipient(address)
  all.select do |mail|
    mail.destinations.include?(address)
  end
end

#lastObject

Returns the last sent mail or nil if there is none.



18
19
20
# File 'lib/tape/adapters/base.rb', line 18

def last
  raise "Not implemented"
end

#parse(mail) ⇒ Object



32
33
34
# File 'lib/tape/adapters/base.rb', line 32

def parse(mail)
  Mail.read mail
end

#resetObject



22
23
24
# File 'lib/tape/adapters/base.rb', line 22

def reset
  raise "Not implemented"
end