Class: MailChecker::Expectation
- Inherits:
-
Object
- Object
- MailChecker::Expectation
- Defined in:
- lib/mail_checker/expectation.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
- #from(*args) ⇒ Object
-
#initialize(subject = nil) ⇒ Expectation
constructor
A new instance of Expectation.
- #to(*args) ⇒ Object
- #with(attributes) ⇒ Object
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
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/mail_checker/expectation.rb', line 3 def attributes @attributes end |
#subject ⇒ Object (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 |