lib/preek/output.rb in preek-1.4.3 vs lib/preek/output.rb in preek-1.5.0
- old
+ new
@@ -7,10 +7,12 @@
def print_line
say "\n\t#{'-'*60}\n\n"
end
+ alias :separator :print_line
+
def blue(*args)
status *args, :blue
end
def green(*args)
@@ -18,10 +20,16 @@
end
def red(*args)
status *args, :red
end
+
+ def separated(&block)
+ print_line
+ yield
+ print_line
+ end
end
class CompactOutput < Output
def status(title, text, color = nil)
title = title.to_s + ": " if title.is_a?(Symbol)
@@ -30,7 +38,8 @@
end
def print_line
say "\n-\n\n"
end
+ alias :separator :print_line
end
end
\ No newline at end of file