Skip to content

Instantly share code, notes, and snippets.

@jerryskye
jerryskye / zadania.rb
Created October 18, 2017 23:47
zadania do rozwiązania - warsztaty Ruby on Rails
#Zadanie 1:
def passed_or_failed hsh, threshold
[[:passed, :failed], hsh.partition {|k, v| v.to_i >= threshold.to_i}.map(&:to_h)].transpose.to_h
end
#Zadanie 2:
class CaesarCipher
def initialize str, rotation=13
@str = str
@rotation = rotation

Keybase proof

I hereby claim:

  • I am jerryskye on github.
  • I am jerryskye (https://keybase.io/jerryskye) on keybase.
  • I have a public key ASA-ecHD8MkZ1V5-ZJlNNrhdFT2bg_U6WaEX8OpUnt_-kQo

To claim this, I am signing this object: