diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-07 07:38:25 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-07 07:38:25 +0000 |
commit | 9ff1e787f915539b1980654e3d3d2013ff5c81d2 (patch) | |
tree | 8d0fc9ca5b4dbfa9885dc56862292d55091bcaac /ruby_1_8_6/lib/rss/utils.rb | |
parent | 441546edcfbb1b346c87b69c5f578d1a0e522e06 (diff) |
wrong commit; sorryv1_8_6_269
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_6_269@17938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_1_8_6/lib/rss/utils.rb')
-rw-r--r-- | ruby_1_8_6/lib/rss/utils.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/ruby_1_8_6/lib/rss/utils.rb b/ruby_1_8_6/lib/rss/utils.rb deleted file mode 100644 index b242a72292..0000000000 --- a/ruby_1_8_6/lib/rss/utils.rb +++ /dev/null @@ -1,37 +0,0 @@ -module RSS - module Utils - module_function - - # Convert a name_with_underscores to CamelCase. - def to_class_name(name) - name.split(/_/).collect do |part| - "#{part[0, 1].upcase}#{part[1..-1]}" - end.join("") - end - - def get_file_and_line_from_caller(i=0) - file, line, = caller[i].split(':') - [file, line.to_i] - end - - # escape '&', '"', '<' and '>' for use in HTML. - def html_escape(s) - s.to_s.gsub(/&/, "&").gsub(/\"/, """).gsub(/>/, ">").gsub(/</, "<") - end - alias h html_escape - - # If +value+ is an instance of class +klass+, return it, else - # create a new instance of +klass+ with value +value+. - def new_with_value_if_need(klass, value) - if value.is_a?(klass) - value - else - klass.new(value) - end - end - - def element_initialize_arguments?(args) - [true, false].include?(args[0]) and args[1].is_a?(Hash) - end - end -end |