README.rdoc
The ToYn (To Yes/No) Gem allows simple translation of boolean values to an English “Yes” or “No”.
-
ruby 1.8.7, 1.9.2, or 1.9.3
you_are_awesome = true you_are_awesome.to_yn #=> "Yes" dot_net_rules = false dot_net_rules.to_yn #=> "No" nothing_to_see_here = nil nothing_to_see_here.to_yn #=> "No"
In Rails 3, add this to your Gemfile and run the bundle command.
gem "to_yn"
In Rails 2, add this to your environment.rb file.
config.gem "to_yn"
This library is distributed under the GNU General Public License. Please see the LICENSE file.