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
440
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.2k
RBS generation framework using Rack architecture
ksss
0
6.8k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.4k
Rubyに型があると便利か
ksss
4
4.5k
A New Testing Framework Rgot
ksss
0
1.2k
mruby hacking guide
ksss
7
1.8k
Other Decks in Programming
See All in Programming
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
470
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
2
650
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
210
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
210
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.2k
RubyLSPのマルチバイト文字対応
notfounds
0
100
CSC509 Lecture 09
javiergs
PRO
0
140
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
300
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
280
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
590
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
420
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Writing Fast Ruby
sferik
627
61k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
Unsuck your backbone
ammeep
668
57k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
The Cult of Friendly URLs
andyhume
78
6k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Into the Great Unknown - MozCon
thekraken
32
1.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Ruby is Unlike a Banana
tanoku
96
11k
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