Wraps (and unwraps) strings with quotes
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
Gemfile
LICENSE.txt
README.markdown
Rakefile
quote_unquote.gemspec

README.markdown

quote_unquote

Wraps (and unwraps) strings with quotes.

Installation

gem install quote_unquote

Examples

require 'quote_unquote'

"hello".q     # 'hello'
"hello".qq    # "hello"

"'hello'".uq  # hello
'"hello"'.uqq # hello

"Is this a joke?" "Yup."

Slightly, just slightly more useful examples

# Escapes the quotation marks
"I'm good".q("''")            # 'I''m good'
"I'm good".q("''").uq("''")   # I'm good

Copyright

Copyright (c) 2011 Junegunn Choi. See LICENSE.txt for further details.