Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RaaP

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for ksss ksss
May 08, 2024

 RaaP

Avatar for ksss

ksss

May 08, 2024
Tweet

More Decks by ksss

Other Decks in Programming

Transcript

  1. RBS as a Property ✒ RBS class MyClass def my_method:

    (Integer, Integer) -> Integer end
  2. RBS as a Property 🍎 Property 100.times do int1 =

    Random.rand(100) int2 = Random.rand(100) result = MyClass.new.my_method(int1, int2) assert_kind_of Integer, result end
  3. RBS as a Property Gener a te test c a

    se by RBS And execute code a utom a tic a lly
  4. Edit RBS (Add one overload) class MyClass def my_method: (Integer,

    Integer) -> Integer | (Float, Float) -> Float end