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
140
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
18k
Parsing RBS
soutaro
0
1.4k
Ruby programming with types in action
soutaro
4
860
IDE Development with Ruby
soutaro
4
1k
Ruby 3の新機能としての静的型検査の開発
soutaro
4
7.1k
An Introduction to Static Typing in Ruby 3
soutaro
3
380
The State of Ruby 3 Typing
soutaro
0
680
Ruby3 is a typed language
soutaro
0
350
Ruby Hack Challenge Holiday #8
soutaro
0
570
Other Decks in Programming
See All in Programming
42 best practices for Symfony, a decade later
tucksaun
1
180
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
760
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.4k
N.E.X.T LEVEL
pluu
2
300
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
350
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
선언형 UI에서의 상태관리
l2hyunwoo
0
140
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
94
Making the Leap to Tech Lead
cromwellryan
133
9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
A Philosophy of Restraint
colly
203
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Producing Creativity
orderedlist
PRO
341
39k
RailsConf 2023
tenderlove
29
940
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ʹͨͭ͠ɺރΕ͍ͯΔͷͰͦΜͳʹେม
Ͱͳͦ͞͏