mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss.rb, lib/rss/, test/rss/:
- 0.1.9 -> 0.2.0. - supported Slash module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b528261ad8
commit
1b56bcce22
19 changed files with 296 additions and 18 deletions
|
@ -62,9 +62,11 @@ module RSS
|
|||
|
||||
module CSV
|
||||
module_function
|
||||
def parse(value)
|
||||
def parse(value, &block)
|
||||
if value.is_a?(String)
|
||||
value.strip.split(/\s*,\s*/)
|
||||
value = value.strip.split(/\s*,\s*/)
|
||||
value = value.collect(&block) if block_given?
|
||||
value
|
||||
else
|
||||
value
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue