Sha256: 25c650f3997f1169c58030f8087637e1d71432177d9d6fafa9e8cdec1ce9fce9

Contents?: true

Size: 293 Bytes

Versions: 8

Compression:

Stored size: 293 Bytes

Contents

module PgObjects
  ##
  # Console output
  #
  # Passs +true+ to constructor to suppress output
  class Logger
    attr_reader :silent

    def initialize(silent = false)
      @silent = silent
    end

    def write(str)
      puts "== #{str} ".ljust(80, '=') unless silent
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pg_objects-0.5.5 lib/pg_objects/logger.rb
pg_objects-0.5.4 lib/pg_objects/logger.rb
pg_objects-0.5.3 lib/pg_objects/logger.rb
pg_objects-0.5.2 lib/pg_objects/logger.rb
pg_objects-0.4.4 lib/pg_objects/logger.rb
pg_objects-0.4.3 lib/pg_objects/logger.rb
pg_objects-0.4.2 lib/pg_objects/logger.rb
pg_objects-0.3.4 lib/pg_objects/logger.rb