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
560
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.4k
RBS generation framework using Rack architecture
ksss
1
7k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.5k
Rubyに型があると便利か
ksss
4
4.5k
A New Testing Framework Rgot
ksss
0
1.3k
mruby hacking guide
ksss
7
1.9k
Other Decks in Programming
See All in Programming
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
320
Spring gRPC について / About Spring gRPC
mackey0225
0
220
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
10
3.7k
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.4k
Rails アプリ地図考 Flush Cut
makicamel
1
120
Ruby on cygwin 2025-02
fd0
0
150
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
37
14k
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
250
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
110
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
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