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
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
430
Effect の双対、Coeffect
yukikurage
4
470
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
170
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
0
220
Agent Rules as Domain Parser
yodakeisuke
1
450
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
120
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
860
TypeScriptのmoduleオプションを改めて整理する
bicstone
4
460
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
880
プロダクト改善のために新しいことを始める -useContextからの卒業、Zustandへ-
rebase_engineering
1
110
RubyKaigiで得られる10の価値 〜Ruby話を聞くことだけが RubyKaigiじゃない〜
tomohiko9090
0
130
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
15
900
Visualization
eitanlees
146
16k
Music & Morning Musume
bryan
47
6.6k
We Have a Design System, Now What?
morganepeng
52
7.6k
The Cost Of JavaScript in 2023
addyosmani
49
8.3k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
860
What's in a price? How to price your products and services
michaelherold
245
12k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Faster Mobile Websites
deanohume
307
31k
Producing Creativity
orderedlist
PRO
346
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
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