summaryrefslogtreecommitdiff
path: root/lib/rss/utils.rb
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-06 08:02:56 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-06 08:02:56 +0000
commit5923a2c0e770515a9c7144c50e09a32350695b00 (patch)
tree66882c2ac60d7d1b25bb49ee476cb829695aa906 /lib/rss/utils.rb
parent8e773df6d3b68caf2e56e6c75a8e48bf2ccc1bd3 (diff)
This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/utils.rb')
-rw-r--r--lib/rss/utils.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/rss/utils.rb b/lib/rss/utils.rb
new file mode 100644
index 0000000000..ae6f69bcf1
--- /dev/null
+++ b/lib/rss/utils.rb
@@ -0,0 +1,17 @@
+module RSS
+
+ module Utils
+
+ def get_file_and_line_from_caller(i=0)
+ file, line, = caller[i].split(':')
+ [file, line.to_i]
+ end
+
+ def html_escape(s)
+ s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;")
+ end
+ alias h html_escape
+
+ end
+
+end