Sha256: 088913837a715fbddf28fb0c5a768609eecad79a8361e6a6a6529eb4313772bd
Contents?: true
Size: 882 Bytes
Versions: 4
Compression:
Stored size: 882 Bytes
Contents
# = Glue # # General libraries used by various projects. # # code: # * George Moschovitis <gm@navel.gr> # # (c) 2004 Navel, all rights reserved. # $Id: glue.rb 175 2004-11-26 16:11:27Z gmosx $ require "English" require "pp" require 'glue/property' class NilClass # quite usefull for error tolerant apps. # a bit dangerous? Will have to rethink this. # def empty? return 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\tBACKTRACE:\n\t#{ex.backtrace.join("\n\t")}\n\tLOGGED FROM:\n\t#{caller[0]}} end end # predefine some comonly used objects EMPTY_STRING = ""
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
nitro-0.7.0 | lib/glue.rb |
nitro-0.6.0 | lib/glue.rb |
og-0.6.0 | lib/glue.rb |
og-0.7.0 | lib/glue.rb |