Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RaaP
Search
ksss
May 08, 2024
Programming
0
570
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.4k
RBS generation framework using Rack architecture
ksss
1
7k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.5k
Rubyに型があると便利か
ksss
4
4.5k
A New Testing Framework Rgot
ksss
0
1.3k
mruby hacking guide
ksss
7
1.9k
Other Decks in Programming
See All in Programming
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
920
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
0
140
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
150
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
890
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.2k
ML.NETで始める機械学習
ymd65536
0
230
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
200
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
150
SwiftUI Viewの責務分離
elmetal
PRO
2
270
CloudNativePGを布教したい
nnaka2992
0
110
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
17
4k
楽しく向き合う例外対応
okutsu
0
660
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Faster Mobile Websites
deanohume
306
31k
Building Adaptive Systems
keathley
40
2.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
A designer walks into a library…
pauljervisheath
205
24k
How to Ace a Technical Interview
jacobian
276
23k
Mobile First: as difficult as doing things right
swwweet
223
9.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Adopting Sorbet at Scale
ufuk
74
9.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Transcript
ksss Run your RBS like a testing code. RBS as
a Property
RBS as a Property ✒ RBS class MyClass def my_method:
(Integer, Integer) -> Integer end
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
RBS as a Property ✒🍎
RBS as a Property Gener a te test c a
se by RBS And execute code a utom a tic a lly
https://github.com/ksss/raap This is the RaaP
Demo
Edit RBS (Add one overload) class MyClass def my_method: (Integer,
Integer) -> Integer | (Float, Float) -> Float end
You can run RBS instantly!
If the RBS is wrong? class MyClass def my_method: (Integer,
String) -> Integer end
It detects failures and also displays reproduction codes.
Support Union type class MyClass def my_method: (0 | 1
| 2, 3 | 4 | 5) -> Integer end
Choose one of the Unions and run it. With coverage!
RBS as a Property RaaP