Class: Spreewald::Steps::ShowMeTheMails
- Inherits:
-
Object
- Object
- Spreewald::Steps::ShowMeTheMails
- Defined in:
- lib/steps/show_me_the_mails.rb
Instance Method Summary collapse
-
#initialize(mails, only_header = false) ⇒ ShowMeTheMails
constructor
A new instance of ShowMeTheMails.
- #run ⇒ Object
Constructor Details
#initialize(mails, only_header = false) ⇒ ShowMeTheMails
Returns a new instance of ShowMeTheMails.
6 7 8 9 |
# File 'lib/steps/show_me_the_mails.rb', line 6 def initialize(mails, only_header = false) @mails = mails @only_header = only_header end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/steps/show_me_the_mails.rb', line 11 def run if @mails.empty? puts "No emails found" else puts MailFinder.show_mails(@mails, @only_header) end end |