Skip to content

Instantly share code, notes, and snippets.

@patrickgombert
Created March 20, 2012 04:56
Show Gist options
  • Save patrickgombert/2131509 to your computer and use it in GitHub Desktop.
Save patrickgombert/2131509 to your computer and use it in GitHub Desktop.
ISP
class Reader
def read
return get.chomp()
end
end
class Writer
def write(chars)
puts chars
end
end
def copy(reader, writer)
chars = reader.read
writer.write(chars)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment