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
170
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
3.7k
RBS generation framework using Rack architecture
ksss
0
6.4k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.4k
Rubyに型があると便利か
ksss
4
4.3k
A New Testing Framework Rgot
ksss
0
1.2k
mruby hacking guide
ksss
7
1.7k
Other Decks in Programming
See All in Programming
Amazon Aurora Serverless v2が意外と高かった話と、AWS Database Migration Serviceの話
satoshi256kbyte
1
110
“Seeing Like a Programmer”—Resiliency, Limits, and Moral Hazards in Software Engineering (LambdaConf 2024)
chriskrycho
0
440
戦略的DDDは重いのか? / Is strategic DDD heavy?
pictiny
3
2.2k
RustでAWS Lambda functionをいい感じに書く
taiki45
2
160
Try creating your own orderedmap
kazamori
1
290
The World is a Network (and We Are Just Nodes)
whatyouhide
0
100
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
2.9k
JS RPCを理解する
yusukebe
5
310
TypeScriptから始める VR生活
tamagokakeg
2
140
RailsConf 2024: Riffing on Rails: sketch your way to better designed code
kaspth
1
220
Long journey of Ruby standard library RubyKaigi 2024
andpad
2
310
酒飲んでたらテックリードになった話
spbaya0141
0
210
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
12
1.1k
GitHub's CSS Performance
jonrohan
1025
450k
Adopting Sorbet at Scale
ufuk
69
8.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
1
130
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
A better future with KSS
kneath
231
16k
Optimizing for Happiness
mojombo
371
69k
Web Components: a chance to create the future
zenorocha
306
41k
How to train your dragon (web standard)
notwaldorf
75
5.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Into the Great Unknown - MozCon
thekraken
15
1.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