gmail

https://github.com/gmailgem/gmail

Ruby

A Rubyesque interface to Gmail, with all the tools you'll need.

Gmail::Client::Base#label

Do something with given mailbox or within it context.

==== Examples

  mailbox = gmail.mailbox("INBOX")
  mailbox.emails(:all)
  mailbox.count(:unread, :before => Time.now-(20*24*3600))

... or block style:

  gmail.label("Work") do |mailbox|
    mailbox.emails(:unread)
    mailbox.count(:all)
    ...
  end

Source | Google | Stack overflow

Edit

git clone [email protected]:gmailgem/gmail.git

cd gmail

open lib/gmail/client/base.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Gmail--Client--Base-label-for-pr


# Commit to git

git add lib/gmail/client/base.rbgit commit -m "better docs for Gmail::Client::Base#label"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Gmail--Client--Base-label-for-pr

hub pull-request


# Celebrate!