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
イベント駆動で成長して委員会
happymana
1
340
ヤプリ新卒SREの オンボーディング
masaki12
0
130
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
900
Better Code Design in PHP
afilina
PRO
0
130
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
940
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
Jakarta EE meets AI
ivargrimstad
0
690
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Faster Mobile Websites
deanohume
305
30k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Docker and Python
trallard
40
3.1k
Building Adaptive Systems
keathley
38
2.3k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Adopting Sorbet at Scale
ufuk
73
9.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Six Lessons from altMBA
skipperchong
27
3.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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ʹͨͭ͠ɺރΕ͍ͯΔͷͰͦΜͳʹେม
Ͱͳͦ͞͏