# File /home/cepheus/projects/prep/log4r-1.0.0/src/log4r/outputters.rb, line 42 def initialize(_name, hash=nil) if _name.nil? or hash.nil? raise ArgumentError, "no arguments specified", caller end validate_hash(hash) @name = _name _filename = (hash[:filename] or hash['filename'] or nil) _trunc = hash[:trunc] _trunc = hash['trunc'] if _trunc.nil? case _trunc when false, "false" then @trunc = false else @trunc = true end raise TypeError, "Filename must be specified" if _filename.nil? if _filename.type != String raise TypeError, "Argument 'filename' must be a String", caller end @filename = _filename @out = File.new(@filename, (@trunc ? "w" : "a")) @@outputters[@name] = self end