diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-28 03:46:13 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-28 03:46:13 +0000 |
| commit | 2cfa999f7baa1b994c9a0e3fef6b05f30d2ec7d9 (patch) | |
| tree | 6262080bde1c6376c96bdc05d2a6692bd9de6818 /lib/rss/utils.rb | |
| parent | 28651fcd3db70dc779fd2d8d119229d3721de34b (diff) | |
| download | ruby-2cfa999f7baa1b994c9a0e3fef6b05f30d2ec7d9.tar.gz ruby-2cfa999f7baa1b994c9a0e3fef6b05f30d2ec7d9.tar.xz ruby-2cfa999f7baa1b994c9a0e3fef6b05f30d2ec7d9.zip | |
* lib/rss: rss library imported. [ruby-dev:22726]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/utils.rb')
| -rw-r--r-- | lib/rss/utils.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/rss/utils.rb b/lib/rss/utils.rb new file mode 100644 index 000000000..32940cf2a --- /dev/null +++ b/lib/rss/utils.rb @@ -0,0 +1,19 @@ +module RSS + + module Utils + + def get_file_and_line_from_caller(i=0) + tmp = caller[i].split(':') + line = tmp.pop.to_i + file = tmp.join(':') + [file, line] + end + + def html_escape(s) + s.to_s.gsub(/&/, "&").gsub(/\"/, """).gsub(/>/, ">").gsub(/</, "<") + end + alias h html_escape + + end + +end |
