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
Rubyの標準添付ライブラリを開発する
Search
Soutaro Matsumoto
May 24, 2024
Programming
2
130
Rubyの標準添付ライブラリを開発する
Nextbeat Tech Bar:第一回ライブラリ開発について考える会 (
https://nextbeat.connpass.com/event/312789/
)
Soutaro Matsumoto
May 24, 2024
Tweet
Share
More Decks by Soutaro Matsumoto
See All by Soutaro Matsumoto
Embedding it into Ruby code
soutaro
4
17k
Parsing RBS
soutaro
0
1.4k
Ruby programming with types in action
soutaro
4
850
IDE Development with Ruby
soutaro
4
1k
Ruby 3の新機能としての静的型検査の開発
soutaro
4
7k
An Introduction to Static Typing in Ruby 3
soutaro
3
370
The State of Ruby 3 Typing
soutaro
0
680
Ruby3 is a typed language
soutaro
0
350
Ruby Hack Challenge Holiday #8
soutaro
0
560
Other Decks in Programming
See All in Programming
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
みんなでプロポーザルを書いてみた
yuriko1211
0
260
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Macとオーディオ再生 2024/11/02
yusukeito
0
370
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Jakarta EE meets AI
ivargrimstad
0
120
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.4k
最新TCAキャッチアップ
0si43
0
140
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Featured
See All Featured
Speed Design
sergeychernyshev
24
610
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Being A Developer After 40
akosma
86
590k
Scaling GitHub
holman
458
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Teambox: Starting and Learning
jrom
133
8.8k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
BBQ
matthewcrist
85
9.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Transcript
3VCZͷ ඪ४ఴϥΠϒϥϦΛ։ൃ͢Δ দຊफଠ!TPVUBSP
!TPVUBSP w 3VCZίϛολʔ w 3VCZͷܕΛ͍ͬͯΔ w 4UFFQ w 3#4 w
גࣜձࣾλΠϛʔ দຊफଠ
3VCZͷඪ४ϥΠϒϥϦ
3VCZͷඪ४ϥΠϒϥϦ w ৄ͘͠3VCZ,BJHJͷ)JSPTIJ4)*#"5"ͷτʔΫΛݟͯ w IUUQTSVCZLBJHJPSHQSFTFOUBUJPOTITCUIUNMEBZ w πʔϧ w ྨ
πʔϧ w HFN w 3VCZ༻ͷϥΠϒϥϦͷ͜ͱ w 3VCZ(FN w HFNΛΠϯετʔϧ͢Δπʔϧɺϗετ͍ͯ͠ΔαʔϏε w
#VOEMFS w ͲͷHFNΛΠϯετʔϧ͢Δ͔ΛϓϩδΣΫτຖʹཧ͢Δπʔϧ
$ gem install rbs ↑ rbsͱ͍͏gemʢϥΠϒϥϦʣͱͦͷґଘΛΠϯετʔϧ $ bundle install ↑
Gemfileͱ͍͏ϑΝΠϧͷઃఆʹैͬͯɺϓϩδΣΫτ͕ґଘ͢ΔgemΛΠϯετʔϧ
#VOEMFSͷϦϦʔε )JSPTIJ4)*#"5" 3VCZ,BJHJ .BWFOͷϦϦʔε
ඪ४ఴϥΠϒϥϦͷྨ w ΈࠐΈFNCFEEFE w 4UBOEBSEMJCSBSZHFNʹͳ͍ͬͯͳ͍ϥΠϒϥϦͨͪ w %FGBVMUHFNT࠷ॳ͔ΒΠϯετʔϧ͞Ε͍ͯΔHFN w #VOEMFEHFNT࠷ॳ͔ΒΠϯετʔϧ͞Ε͍ͯΔHFN🤔
)JSPTIJ4)*#"5" 3VCZ,BJHJ
IUUQTHJUIVCDPNSVCZSVCZCMPCBEEEEFDGDDEFFEFGHFNTCVOEMFE@HFNT
SCTHFNͷ։ൃ
SCTHFNͷ։ൃ w 3VCZ͔Β#VOEMFEHFNͷҰͭ w 3VCZͱผͷϦϙδτϦͰɺ3VCZDPSFͱಠཱͯ͠։ൃΛߦ͍ɺ3VCZ DPSFͱಠཱͯ͠৽͍͠όʔδϣϯΛϦϦʔε͠ɺ3VCZΛΠϯετʔϧ͢Δ ͱಉ࣌ʹΠϯετʔϧ͞ΕΔ
ͦͦ3#4ͱ w 3VCZϓϩάϥϜͷܕΛදݱ͢Δ ͨΊͷݴޠͱͦͷॲཧΛ͢Δͨ ΊͷϥΠϒϥϦ w IUUQTHJUIVCDPNSVCZSCT w SCTHFNͷதʹɺ3VCZͷΈ ࠐΈϥΠϒϥϦͷܕఆ͕ٛೖͬ
͍ͯΔ
3#4ͷλʔήοτ w 3#4·ͩ։ൃ్தͳͷͰɺ3VCZΑΓසൟʹϦϦʔε͞ΕΔ w ͦͷͨΊ࠷৽ͷϦϦʔε൛3VCZ Λલఏͱͯ͠։ൃ͞Ε͍ͯΔ w 3#4ʹؚ·Ε͍ͯΔඪ४ϥΠϒϥϦͷܕϦϦʔε൛ͷ3VCZલఏ w
͞Βʹɺ։ൃ൛ͷ3VCZ ʹ3#4ؚ·ΕΔ w ͭ·Γʜʜʁʁʁ
·͋·͋յΕΔ
ͳΜͰյΕΔʁ w 3#4ͷΈࠐΈϥΠϒϥϦͷܕΛ֬ೝ͢Δςετ͕յΕΔ w SVCZSVCZϦϙδτϦͰ$*ͰCVOEMFEHFNͷςετΛ࣮ߦ͢ΔΑ͏ʹͳ ͍ͬͯΔ w ϝιου͕ফ͑ͨΓɺҾͷॲཧ͕ඍົʹมΘͬͨΓ͢Δ w ී௨ͷ3VCZϓϩάϥϜʹӨڹ͕ͳ͍͕ɺ3#4ͷςετʹӨڹ͢Δ
ྫ*0XBJUͷฦΓͷܕ͕มΘͬͨ w self | bool | nil͔ΒInteger | false |
nilʹͳͬͨ
͔ͳΓΊΜͲ͍͘͞ 3#4ͷςετΛमਖ਼͢Δ w 3#4ͷܕఆٛ։ൃ൛͕ϦϦʔε͞Ε͔ͯΒߋ৽͢Δ ৽͍͠3#4ΛϦϦʔε͢Δ ৽͘͠ϦϦʔεͨ͠3#4Λͬͯ3VCZͷ$*Λճ͢ ͬͯͳ͔ͬͨΒ͔ΒΓ͠
ରࡦ w SCTHFNΛϦϦʔε͠ͳͯ͘3VCZͷ$*ͰςετͰ͖ΔΑ͏ʹ͢Δ w ίϛοτΛॻ͍͓ͯ͘ͱɺͦΕΛͬͯςετ͢Δ w 3VCZͷ$*͕Δ͜ͱΛ֬ೝ͔ͯ͠ΒSCTHFNΛϦϦʔε͢Δ
ରࡦ w SVCZSVCZͷதʹ͋Δrbs_skip_testsΛฤू͢ΔͱɺSCTHFNͷςετ ΛεΩοϓͰ͖ΔΑ͏ʹͨ͠ w SCTHFNͷमਖ਼ΛͨͣʹSVCZSVCZͷ$*͕ΔΑ͏ʹͳͬͨ
·ͱΊ w ·͋·͋େม w ։ൃ൛ͷ3VCZͱϦϦʔε൛ͷ3VCZΛࠞͥΔͱ͜Ζʹແཧ͕͋Δ w ʮ҆ఆ͍ͯ͠ͳ͍͔Β3VCZΑΓߴසͰϦϦʔε͍ͨ͠ʯͱ͍͏ཁ͕݅ ࠔ͞Λ૿͍ͯ͠Δ w ݹ͔͘Β͋ΔϥΠϒϥϦΛHFNʹͨͭ͠ɺރΕ͍ͯΔͷͰͦΜͳʹେม
Ͱͳͦ͞͏