Class: RSpec::MailMatcher::AddressMatcher
- Inherits:
-
Object
- Object
- RSpec::MailMatcher::AddressMatcher
- Defined in:
- lib/rspec/mail_matcher/address_matcher.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(expected) ⇒ AddressMatcher
constructor
A new instance of AddressMatcher.
- #matches?(mail) ⇒ Boolean
Constructor Details
#initialize(expected) ⇒ AddressMatcher
Returns a new instance of AddressMatcher.
3 4 5 |
# File 'lib/rspec/mail_matcher/address_matcher.rb', line 3 def initialize(expected) @expected = expected end |
Instance Method Details
#matches?(mail) ⇒ Boolean
7 8 9 10 |
# File 'lib/rspec/mail_matcher/address_matcher.rb', line 7 def matches?(mail) @mail = mail mails.include?(@expected) end |