Sha256: 1cae59f13ec9a54ae10e838c32459a52775edf33a5ab8f0beaffaaf0352f293c

Contents?: true

Size: 357 Bytes

Versions: 6

Compression:

Stored size: 357 Bytes

Contents

module ROXML
  module CoreExtensions
    module String #:nodoc:
      module Iterators
        # Allows you to iterate over and modify the sub-strings between _separator_.  Returns the joined result of the modification.
        def between(separator, &block)
          split(separator).collect(&block).join(separator)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
Empact-roxml-2.2 lib/roxml/extensions/string/iterators.rb
Empact-roxml-2.3.0 lib/roxml/extensions/string/iterators.rb
Empact-roxml-2.3.1 lib/roxml/extensions/string/iterators.rb
Empact-roxml-2.4.0 lib/roxml/extensions/string/iterators.rb
roxml-2.3.2 lib/roxml/extensions/string/iterators.rb
roxml-2.4.0 lib/roxml/extensions/string/iterators.rb