Project

wc

0.0
No commit activity in last 3 years
No release in over 3 years
your ruby word counter experience
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.6.2
>= 0
~> 2.3.0
~> 0.6.0
 Project Readme

wc¶ ↑

wc is a rubygem to count word occurrences in a given text.

NEWS This is a major rewrite since version 0.98.2 and the API is completely rewritten from scratch. The expected behavior is to let wc gem to extend a plain ruby String object and use it to retrieve tag cloud. Please note that reading words from a file will be removed in further releases.

<img src=“http://travis-ci.org/thesp0nge/wc.png” />

Usage¶ ↑

Using wc is easy. Just require the gem and use the to_tag_cloud method to the string containing the text you want to transform in a tag cloud

require 'wc'

"A text longer is here".to_tag_cloud ~> "<ul id=\"cloud\"><li><a href=\"#\" class=\"tag0\">text</a></li><li><a href=\"#\" class=\"tag0\">longer</a></li><li><a href=\"#\" class=\"tag0\">here</a></li></ul>"

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2011 Paolo Perego. See LICENSE for details.