No commit activity in last 3 years
No release in over 3 years
Combining many of the benefits of Arrays and Strings, StringRay allows you to treat a String as an Array of words in many cases.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 3.0.2, >= 0
>= 0
>= 0
>= 0
 Project Readme

StringRay

StringRay exposes a powerful method to split a String into an Array of words, and further allows you to include Enumerable, thus exposing many of the most useful Array methods on your Strings.

Links

Usage

Basic usage is really simple. Just take a normal String (the StringRay magic has already been included for you) and enumerate over it, just as you are used to doing with Arrays. By default, this enumerates over the "words" in the string.

"Oi! I'm a string, do something fun with me!".enumerate do |word|
  p word
end

"Who, what, when, where, why? The questions these are.".map do |word|
  word << word[0]
end

You can gain a lot more fine-grained control over how the string is treated by passing arguments to the enumerator methods, or by explicitly creating a StringRay enumerator and modifying it.

TODO: More examples and usage summaries!

Getting

The authoritative source for this project is available at http://github.com/elliottcable/stringray. You can clone your own copy with the following command:

git clone git://github.com/elliottcable/stringray.git

If you want to make changes to the codebase, you need to fork your own GitHub repository for said changes. Send a pullrequest to elliottcable when you've got something ready for the master branch that you think should be merged.

Requirements

To use StringRay, you need... nothing!

Contributing

To develop and contribute to StringRay, you need...

  • gem install rake
  • gem install echoe
  • gem install rspec
  • gem install relevance-rcov
  • gem install yard

Mirrors

If GitHub is unavailable, or you prefer to fork one one of the following sources, they are also available: