mail

https://github.com/mikel/mail

Ruby

A Really Ruby Mail Library

String#to

Returns the beginning of the string up to the +position+ treating the string as an array (where 0 is the first character).

Examples:
  "hello".to(0)  # => "h"
  "hello".to(2)  # => "hel"
  "hello".to(10) # => "hello"

Source | Google | Stack overflow

Edit

git clone [email protected]:mikel/mail.git

cd mail

open lib/mail/core_extensions/string/access.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-String-to-for-pr


# Commit to git

git add lib/mail/core_extensions/string/access.rbgit commit -m "better docs for String#to"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-String-to-for-pr

hub pull-request


# Celebrate!