Skip to content

joshbuddy/respond_to

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Easy way to make respond_to? matchers for case statements.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages