Easy way to make respond_to? matchers for case statements.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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