Sha256: 94a9ffd1697fd1606ef1c4bb59af46e7838bf2736e67e9518fae302c35cc5048

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

require 'navy/version'

require 'fcntl'
require 'etc'
require 'stringio'
require 'kgio'

require 'forwardable'
require 'logger'

module Navy
  extend self
  def logger
    @logger ||= Logger.new($stderr)
  end

  def log_error(logger, prefix, exc)
    message = exc.message
    message = message.dump if /[[:cntrl:]]/ =~ message
    logger.error "#{prefix}: #{message} (#{exc.class})"
    exc.backtrace.each { |line| logger.error(line) }
  end
end
require 'navy/rank'
require 'navy/admiral'
require 'navy/captain'
require 'navy/officer'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
navy-0.0.1 lib/navy.rb