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
660
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.9k
RBS generation framework using Rack architecture
ksss
1
7.5k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.5k
Rubyに型があると便利か
ksss
4
4.7k
A New Testing Framework Rgot
ksss
0
1.3k
mruby hacking guide
ksss
7
1.9k
Other Decks in Programming
See All in Programming
ALL CODE BASE ARE BELONG TO STUDY
uzulla
25
6.4k
CSC509 Lecture 03
javiergs
PRO
0
340
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
220
いま中途半端なSwift 6対応をするより、Default ActorやApproachable Concurrencyを有効にしてからでいいんじゃない?
yimajo
2
440
Le côté obscur des IA génératives
pascallemerrer
0
150
CSC509 Lecture 05
javiergs
PRO
0
300
EMこそClaude Codeでコード調査しよう
shibayu36
0
200
Go言語はstack overflowの夢を見るか?
logica0419
0
470
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
1
320
CSC305 Lecture 05
javiergs
PRO
0
220
品質ワークショップをやってみた
nealle
0
560
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
Featured
See All Featured
Navigating Team Friction
lara
190
15k
Building Applications with DynamoDB
mza
96
6.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Producing Creativity
orderedlist
PRO
347
40k
For a Future-Friendly Web
brad_frost
180
10k
Automating Front-end Workflow
addyosmani
1371
200k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Gamification - CAS2011
davidbonilla
81
5.5k
A better future with KSS
kneath
239
18k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
870
Being A Developer After 40
akosma
91
590k
Become a Pro
speakerdeck
PRO
29
5.6k
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