Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
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
Seamless Flutter Native Integration: FFI & Pigeon - Dreamwalker (JaichangPark / 박제창) @FlutterKaigi2024
itsmedreamwalker
0
120
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
140
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
2
160
似たもの同士のPerlとPHP
uzulla
1
110
React への依存を最小にするフロントエンド設計
takonda
21
8.9k
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.7k
新規学習のハードルを下げる方法とは?/ How to Make Learning Something New Easier?
nobuoooo
1
130
Symfony Mapper Component
soyuka
2
560
Serverless苦闘史
mosh_inc
0
140
物流システムにおけるリファクタリングとアーキテクチャの再構築 〜依存関係とモジュール分割の重要性〜
deeprain
1
730
コンテンツの主権を守るため(?)、高機能画像CDNからAWS自前対応に乗り換えた話
lengthtail
1
120
romajip: 日本の住所CSVデータを活用した英語住所変換ライブラリを作った話
sangunkang
0
2.4k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
How to Think Like a Performance Engineer
csswizardry
21
1.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
1
110
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Producing Creativity
orderedlist
PRO
341
39k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
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ʹͨͭ͠ɺރΕ͍ͯΔͷͰͦΜͳʹେม
Ͱͳͦ͞͏