Sha256: f421f65e917d5ca8e073efa6a83cd803c1d66b164e92bc2f5b773a95961b2d4b

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

# = Glue
#
# General libraries used by various projects.
#
# Copyright (c) 2004-2005, George Moschovitis (http://www.gmosx.com)
# Copyright (c) 2004-2005, Navel Ltd (http://www.navel.gr)
#
# Glue is copyrighted free software created and maintained by 
# George Moschovitis (mailto:gm@navel.gr) and released under the 
# standard BSD Licence. For details consult the file doc/LICENCE.

require 'English'
require 'pp'

require 'glue/property'
require 'glue/attribute'

class NilClass

  # quite usefull for error tolerant apps.
  # a bit dangerous? Will have to rethink this.
  
  def empty?
    true
  end
  
  def blank?
    true
  end
  
end

class Class
  #--
  # gmosx: is this really needed?
  #++
  
  def to_i
    return self.hash
  end
end

module Kernel

  # Pretty prints an exception/error object
  # usefull for helpfull debug messages
  #
  # Input:
  # The Exception/StandardError object
  #
  # Output:
  # the pretty printed string
  
  def pp_exception(ex)
    return %{#{ex.message}\n  #{ex.backtrace.join("\n  ")}\n  LOGGED FROM: #{caller[0]}}
  end

end

module Glue

  # The version.

  Version = '0.22.0'
  
  # Library path.

  LibPath = File.dirname(__FILE__)

end

# Include in the top level binding for easy access.

include Glue

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
glue-0.22.0 lib/glue.rb