Class: Thor::Shell::Basic

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

Instance Method Summary collapse

Instance Method Details



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cpl.rb', line 20

def print_wrapped(message, options = {})
  indent = (options[:indent] || 0).to_i
  if indent.zero?
    stdout.puts(message)
  else
    message.each_line do |message_line|
      stdout.print(" " * indent)
      stdout.puts(message_line.chomp)
    end
  end
end