Module: Gooby::GoobyString
- Included in:
- GoobyObject
- Defined in:
- lib/gooby/mod_string.rb
Instance Method Summary collapse
Instance Method Details
#tokenize(string, delim, strip = false) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gooby/mod_string.rb', line 12 def tokenize(string, delim, strip=false) if string tokens = string.split(delim) if strip tokens.each { |tok| tok.strip! } end tokens else Array.new end end |