Class: Donald::Printer

Inherits:
Object
  • Object
show all
Defined in:
lib/donald/printer.rb

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ Printer

Returns a new instance of Printer.



3
4
5
# File 'lib/donald/printer.rb', line 3

def initialize(output)
  @output = output
end

Instance Method Details



7
8
9
10
11
# File 'lib/donald/printer.rb', line 7

def print_files(files)
  print_delimiter do
    files.each {|f| @output.puts f}
  end
end


13
14
15
16
17
# File 'lib/donald/printer.rb', line 13

def print_no_files_message
  print_delimiter do
    @output.puts 'No unmerged files found'
  end
end