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
550
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.3k
RBS generation framework using Rack architecture
ksss
1
6.9k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.5k
Rubyに型があると便利か
ksss
4
4.5k
A New Testing Framework Rgot
ksss
0
1.2k
mruby hacking guide
ksss
7
1.9k
Other Decks in Programming
See All in Programming
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
Swiftコンパイラ超入門+async関数の仕組み
shiz
0
170
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
530
HTML/CSS超絶浅い説明
yuki0329
0
190
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
1k
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.6k
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
Alba: Why, How and What's So Interesting
okuramasafumi
0
190
2025.01.17_Sansan × DMM.swift
riofujimon
2
510
Featured
See All Featured
Scaling GitHub
holman
459
140k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Designing Experiences People Love
moore
139
23k
Making the Leap to Tech Lead
cromwellryan
133
9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
We Have a Design System, Now What?
morganepeng
51
7.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Adopting Sorbet at Scale
ufuk
74
9.2k
Automating Front-end Workflow
addyosmani
1366
200k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
RailsConf 2023
tenderlove
29
970
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