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
610
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.2k
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
はじめてのPDFKit.pdf
shomakato
0
110
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
150
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
140
データと事例で振り返るDevin導入の"リアル" / The Realities of Devin Reflected in Data and Case Studies
rkaga
3
2.3k
知識0からカンファレンスやってみたらこうなった!
syossan27
5
280
「理解」を重視したAI活用開発
fast_doctor
0
310
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
140
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
250
M5UnitUnified 最新動向 2025/05
gob
0
140
Road to Ruby for A Linguistics Nerd
hayat01sh1da
PRO
0
330
AIコーディングの理想と現実
tomohisa
38
40k
Cloudflare Workersで進めるリモートMCP活用
syumai
7
730
Featured
See All Featured
It's Worth the Effort
3n
184
28k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
How STYLIGHT went responsive
nonsquared
100
5.5k
How to train your dragon (web standard)
notwaldorf
91
6k
Code Review Best Practice
trishagee
68
18k
Unsuck your backbone
ammeep
671
58k
Faster Mobile Websites
deanohume
307
31k
Into the Great Unknown - MozCon
thekraken
38
1.8k
The Cult of Friendly URLs
andyhume
78
6.4k
A Tale of Four Properties
chriscoyier
159
23k
Agile that works and the tools we love
rasmusluckow
329
21k
What's in a price? How to price your products and services
michaelherold
245
12k
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