Class: Thor::Shell::Basic
- Inherits:
-
Object
- Object
- Thor::Shell::Basic
- Defined in:
- lib/mkmatter.rb
Instance Method Summary collapse
Instance Method Details
#print_wrapped(message, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mkmatter.rb', line 15 def print_wrapped(, = {}) .lstrip! .gsub!(/\n\s+/, "\n") = .split("\n") .each do |line| line.gsub!(/^------/, ' ') if line[0..5] == '------' line.gsub!(/^----/, ' ') if line[0..3] == '----' line.gsub!(/^--/, ' ') if line[0..1] == '--' stdout.puts line end end |