Class: Spreewald::Steps::ShowMeTheMails

Inherits:
Object
  • Object
show all
Defined in:
lib/steps/show_me_the_mails.rb

Instance Method Summary collapse

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

#runObject



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