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
620
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.6k
RBS generation framework using Rack architecture
ksss
1
7.3k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.5k
Rubyに型があると便利か
ksss
4
4.6k
A New Testing Framework Rgot
ksss
0
1.3k
mruby hacking guide
ksss
7
1.9k
Other Decks in Programming
See All in Programming
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
210
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
120
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
360
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
290
Bytecode Manipulation 으로 생산성 높이기
bigstark
1
350
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
510
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
3k
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
1
550
エラーって何種類あるの?
kajitack
5
150
AIネイティブなプロダクトをGolangで挑む取り組み
nmatsumoto4
0
110
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
140
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
270
Featured
See All Featured
It's Worth the Effort
3n
184
28k
Why Our Code Smells
bkeepers
PRO
337
57k
How to train your dragon (web standard)
notwaldorf
92
6.1k
Faster Mobile Websites
deanohume
307
31k
The Pragmatic Product Professional
lauravandoore
35
6.7k
How GitHub (no longer) Works
holman
314
140k
Making Projects Easy
brettharned
116
6.2k
How to Ace a Technical Interview
jacobian
276
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
RailsConf 2023
tenderlove
30
1.1k
Speed Design
sergeychernyshev
31
990
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
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