gmail

https://github.com/gmailgem/gmail

Ruby

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

Gmail::Mailbox#count

This is a convenience method that really probably shouldn't need to exist,
but it does make code more readable, if seriously all you want is the count
of messages.

==== Examples

  gmail.inbox.count(:all)
  gmail.inbox.count(:unread, :from => "[email protected]")
  gmail.mailbox("Test").count(:all, :after => Time.now-(20*24*3600))

Source | Google | Stack overflow

Edit

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

cd gmail

open lib/gmail/mailbox.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Gmail--Mailbox-count-for-pr


# Commit to git

git add lib/gmail/mailbox.rbgit commit -m "better docs for Gmail::Mailbox#count"


# 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--Mailbox-count-for-pr

hub pull-request


# Celebrate!