Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Easy way to make respond_to? matchers for case statements.
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gemfile
README.rdoc
Rakefile
respond_to.gemspec

README.rdoc

respond_to

Easy way to make respond_to? matchers for case statements.

Usage

require 'respond_to'
str = 'my string'
case str
when ~:<<
  str << 'new data'
when ~:push
  str.push 'new data'
when ~:+
  str += 'new data'
else
  raise
end
Something went wrong with that request. Please try again.