X-Git-Url: http://git.code-monkey.de/?p=redact.git;a=blobdiff_plain;f=lib%2Fredact%2Fredact.rb;h=f1a93faa0cd3b8667c11a48c549cda9062296cec;hp=581c4c4297739fd0667a039ce675bfe16ed37098;hb=5509b434e26fd1a8c9c3990154a881583b81d2a6;hpb=eabefe8c75ede2bdf39853e56c5d59984893decc diff --git a/lib/redact/redact.rb b/lib/redact/redact.rb index 581c4c4..f1a93fa 100644 --- a/lib/redact/redact.rb +++ b/lib/redact/redact.rb @@ -1,6 +1,4 @@ #-- -# $Id: redact.rb 53 2005-06-11 13:21:38Z tilman $ -# # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de) # # Permission is hereby granted, free of charge, to any person obtaining @@ -57,7 +55,7 @@ class String end module Redact - VERSION = "0.1.2" + VERSION = "0.1.5" class RedactError < StandardError; end @@ -259,7 +257,8 @@ module Redact end def script=(v) - @script = v.to_str.dup + v = v.to_str + @script = (File.exist?(v) ? File.read(v) : v).dup end def part(name, type = :invalid) # :yields: part