lettercase

Build Status

Description

Convert some letter cases around programming.

Features

  • snake_case
  • camelCase
  • PascalCase

  • PureRuby :)

Usage

Introduction

require 'lettercase'

LetterCase.pascalize 'letter_case' #=> "LetterCase"

require 'lettercase/core_ext'

'LetterCase'.snakecase             #=> "letter_case"
'letter_case'.camelcase            #=> "letterCase"
'letter_case'.pascalcase           #=> "LetterCase"

# Aliases: Method name describes to self role
'lettercase'.UPCASE                #=> "LETTERCASE"
'LetterCase'.snake_case            #=> "letter_case"
'letter_case'.camelCase            #=> "letterCase"
'letter_case'.PascalCase           #=> "LetterCase"

Requirements

Install

$ gem install lettercase

Link

License

The MIT X11 License
Copyright (C) 2012 Kenichi Kamiya
See the file LICENSE for further details.