Sha256: 64ffa1e6fa03f182c0b8e860e479b6f46afccba099c54abf828d7fd648d2950f

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 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.20.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.20.0 lib/glue.rb