Class: MailChecker::Expectation

Inherits:
Object
  • Object
show all
Defined in:
lib/mail_checker/expectation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject = nil) ⇒ Expectation

Returns a new instance of Expectation.



5
6
7
# File 'lib/mail_checker/expectation.rb', line 5

def initialize(subject = nil)
  @subject = subject
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



3
4
5
# File 'lib/mail_checker/expectation.rb', line 3

def attributes
  @attributes
end

#subjectObject (readonly)

Returns the value of attribute subject.



3
4
5
# File 'lib/mail_checker/expectation.rb', line 3

def subject
  @subject
end

Instance Method Details

#from(*args) ⇒ Object



15
16
17
18
19
# File 'lib/mail_checker/expectation.rb', line 15

def from(*args)
  return @from if args.empty?
  @from = args.first
  self
end

#to(*args) ⇒ Object



9
10
11
12
13
# File 'lib/mail_checker/expectation.rb', line 9

def to(*args)
  return @to if args.empty?
  @to = args.first
  self
end

#with(attributes) ⇒ Object



21
22
23
24
# File 'lib/mail_checker/expectation.rb', line 21

def with(attributes)
  @attributes = attributes
  self
end