Module: ROXML::CoreExtensions::String::Iterators
- Included in:
- String
- Defined in:
- lib/roxml/extensions/string/iterators.rb
Instance Method Summary collapse
-
#between(separator, &block) ⇒ Object
Allows you to iterate over and modify the sub-strings between separator.
Instance Method Details
#between(separator, &block) ⇒ Object
Allows you to iterate over and modify the sub-strings between separator. Returns the joined result of the modification.
6 7 8 |
# File 'lib/roxml/extensions/string/iterators.rb', line 6 def between(separator, &block) split(separator).collect(&block).join(separator) end |