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
600
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
4.5k
RBS generation framework using Rack architecture
ksss
1
7.2k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.5k
Rubyに型があると便利か
ksss
4
4.6k
A New Testing Framework Rgot
ksss
0
1.3k
mruby hacking guide
ksss
7
1.9k
Other Decks in Programming
See All in Programming
Exit 8 for SwiftUI
ojun9
0
140
AI時代の開発者評価について
ayumuu
0
190
AHC045_解説
shun_pi
0
560
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.9k
「影響が少ない」を自分の目でみてみる
o0h
PRO
2
1.2k
状態と共に暮らす:ステートフルへの挑戦
ypresto
2
790
「”誤った使い方をすることが困難”な設計」で良いコードの基礎を固めよう / phpcon-odawara-2025
taniguhey
0
170
Sharing features among Android applications: experience feedback
jbvincey
0
110
小田原でみんなで一句詠みたいな #phpcon_odawara
stefafafan
0
350
Chrome Extension Techniques from Hell
moznion
1
160
Strategic Design (DDD)for the Frontend @DDD Meetup Stuttgart
manfredsteyer
PRO
0
170
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
110
Featured
See All Featured
Faster Mobile Websites
deanohume
306
31k
Thoughts on Productivity
jonyablonski
69
4.6k
A Modern Web Designer's Workflow
chriscoyier
693
190k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Statistics for Hackers
jakevdp
798
220k
Writing Fast Ruby
sferik
628
61k
Site-Speed That Sticks
csswizardry
5
500
Fireside Chat
paigeccino
37
3.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Designing for Performance
lara
608
69k
The Cult of Friendly URLs
andyhume
78
6.3k
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