lib/cputs.rb in cputs-0.1.1 vs lib/cputs.rb in cputs-0.1.2

- old
+ new

@@ -15,11 +15,11 @@ ## # Override the usual *puts* method to always use # cputs instead. - def self.override_puts + def CPuts.override_puts require_relative 'cputs/override.rb' end ## # Sets the preffix for the output @@ -38,9 +38,19 @@ ## # Sets both the preffix and suffix for the output def CPuts.set_preffix_and_suffix(*args) CPuts::Functions.preffix_and_suffix *args + end + + ## + # Sets timestamp to be shown in the output. It can be: + # False to disable it + # True to enable it + # String with format, which also enables it + + def CPuts.set_timestamp(format=nil) + CPuts::Functions.timestamp(format) end alias :default_puts :puts end \ No newline at end of file