]> git.r.bdr.sh - rbdr/cologne/blobdiff - lib/cobalt.rb
Version bump to 0.1.0
[rbdr/cologne] / lib / cobalt.rb
index a85409f8e0e1c5e72c5a5041bdedcb448f95d4bd..bcd683c020b7c91eb16601e9584ca85945113b73 100644 (file)
@@ -6,13 +6,11 @@ module Cobalt
 
   class Console
 
 
   class Console
 
-    attr_accessor :keep_in_buffer, :separator_length
+    attr_accessor :separator_length
 
     def initialize( options = {} )
       @indent           = 0
       @loggers          = options[:loggers] || [::Logger.new(STDOUT)]
 
     def initialize( options = {} )
       @indent           = 0
       @loggers          = options[:loggers] || [::Logger.new(STDOUT)]
-      @keep_in_buffer   = false
-      @temporal_buffer  = []
       @separator_length = 120
       @color            = :white
     end
       @separator_length = 120
       @color            = :white
     end
@@ -25,30 +23,12 @@ module Cobalt
       @loggers = @loggers - [logger]
     end
 
       @loggers = @loggers - [logger]
     end
 
-    def release_buffer
-      @keep_in_buffer = false
-      @temporal_buffer.each do |line|
-        @loggers.each { |logger| logger.info(line) }
-      end
-      @temporal_buffer = []
-      nil
-    end
-
     def log(*objects)
       objects.each do |object|
     def log(*objects)
       objects.each do |object|
-
         the_string = object.to_s
         the_string = the_string.to_ansi.send(@color).to_s
         the_string = the_string.gsub(/^/, ' ' * @indent)
         the_string = object.to_s
         the_string = the_string.to_ansi.send(@color).to_s
         the_string = the_string.gsub(/^/, ' ' * @indent)
-
-        @loggers.each do |logger|
-          if @keep_in_buffer
-            @temporal_buffer << the_string
-            next
-          end
-          logger.info the_string
-        end
-
+        @loggers.each { |logger| logger.info(the_string) }
       end
       self
     end
       end
       self
     end
@@ -63,6 +43,10 @@ module Cobalt
       log(dump)
     end
 
       log(dump)
     end
 
+    def info(*objects)
+      notice(*objects)
+    end
+
     def notice(*objects)
       color(:cyan) { log(*objects) }
     end
     def notice(*objects)
       color(:cyan) { log(*objects) }
     end