Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
Wordsmith is a library for pluralizing, ordinalizing, singularizing and doing other fun and useful things with words.
Add this to your application's shard.yml
:
dependencies:
wordsmith:
github: luckyframework/wordsmith
version: ~> 0.2
require "wordsmith"
Wordsmith::Inflector.pluralize("word") # "words"
Wordsmith::Inflector.singularize("categories") # "category"
Wordsmith::Inflector.camelize("application_controller") # "ApplicationController"
Wordsmith::Inflector.underscore("CheeseBurger") # "cheese_burger"
Wordsmith::Inflector.humanize("employee_id") # "Employee"
Wordsmith::Inflector.titleize("amazon web services") # "Amazon Web Services"
Wordsmith::Inflector.tableize("User") # "users"
Wordsmith::Inflector.classify("users") # "User"
Wordsmith::Inflector.dasherize("PostOffice") # "post-office"
Wordsmith::Inflector.ordinalize(4) # "4th"
./bin/test
to run the specs, build shards, and check formattingTo run the tests:
./bin/test