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
みんなに知って欲しい Meguro.rb
Search
Nao Minami
July 29, 2018
Programming
0
280
みんなに知って欲しい Meguro.rb
東急 Ruby 会議 #12 LTで、前半は meguro.rb の紹介、後半は yard2steep の紹介 LT をしました!
Nao Minami
July 29, 2018
Tweet
Share
More Decks by Nao Minami
See All by Nao Minami
Real World Migration from HTTP to gRPC #CNDT2020
south37
3
5.7k
Real World Migration from HTTP to gRPC in Ruby #grpcconf
south37
2
4.3k
Getting Things Done をベースにした仕事の進め方 / How to Work with Getting Things Done
south37
7
7.7k
Web API に秩序を与える Protocol Buffers / Protocol Buffers for Web API #builderscon
south37
18
16k
puma v4 では SIGTERM での worker process ゾンビ化に気をつけよう / Be aware of zombie processes in puma v4
south37
0
3.7k
理想的なマイクロサービスアーキテクチャを目指す継続的改善 / Re-architecturing of Microservices #CNDT2019
south37
10
14k
gcpc: Google Cloud Pub/Sub Client for Ruby #tqrk13
south37
1
760
実行計画から学ぶ PostgreSQL の内部動作とクエリ最適化 / Learn PostgreSQL from Explain
south37
8
39k
学びを得るための新卒 ISUCON / New Grad ISUCON for Learning
south37
4
41k
Other Decks in Programming
See All in Programming
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
100
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
140
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
Six Lessons from altMBA
skipperchong
27
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Happy Clients
brianwarren
98
6.7k
Fireside Chat
paigeccino
34
3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
100
The World Runs on Bad Software
bkeepers
PRO
65
11k
Transcript
©2018 Wantedly, Inc. 29.Jul.2018 - Nao Minami (@south37) ΈΜͳʹͬͯཉ͍͠ YARD
Ͱ੩తܕ͖ Ruby ʢyard2steepʣ
©2018 Wantedly, Inc. 29.Jul.2018 - Nao Minami (@south37) ΈΜͳʹͬͯཉ͍͠ YARD
Ͱ੩తܕ͖ Ruby ʢyard2steepʣ ͱࢥͬͨΜͰ͕͢ɻɻɻ
©2018 Wantedly, Inc. 29.Jul.2018 - Nao Minami (@south37) ΈΜͳʹͬͯཉ͍͠ YARD
Ͱ੩తܕ͖ Ruby ʢyard2steepʣ Ͱແཧͦ͏ʂ
©2018 Wantedly, Inc. 29.Jul.2018 - Nao Minami (@south37) ΈΜͳʹͬͯཉ͍͠ Meguro.rb
©2018 Wantedly, Inc. ࣗݾհ
©2018 Wantedly, Inc. Nao Minami / @south37, @minami7o Infrastructure engineer
@ Wantedly, Inc.
©2018 Wantedly, Inc. .FHVSPSCͬͯ·͢ʂ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. ࠇۙลɻɻɻʁʁʁ
©2018 Wantedly, Inc. ҆͝৺͍ͩ͘͞ʂ
©2018 Wantedly, Inc. ࠇ֓೦ʂ
©2018 Wantedly, Inc. w ࠇӺ۠ʢʁʣ w .FHVSPSCനۚɾޒా Ͱ։࠵ʢʁʣ
©2018 Wantedly, Inc. ࠇʹڥքແ͍ʂ
©2018 Wantedly, Inc. ໌ޙΞΧπΩ͞ΜΦϑΟεͰ ։࠵ͳͷͰੋඇ͝ࢀՃ͍ͩ͘͞ʂ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. DPOOQBTTͰNFHVSPSCͰݕࡧʂ
©2018 Wantedly, Inc. എܠ ZBSETUFFQͷ͝հ ·ͱΊ ࠓ͢༰
©2018 Wantedly, Inc. ಥવͰ͕͢ɻɻɻ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. 3VCZ,JHJ ྑ͔ͬͨͰ͢Ͷʂ
©2018 Wantedly, Inc. ৭ʑͳτʔΫ͕͋Γ·͕ͨ͠ɺ 4UFFQͱ͍͏ʮ੩తܕ͚πʔϧʯ͕ ҹʹΓ·ͨ͠
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. 4UFFQͱ w 3VCZʹରͯ͠੩తܕ͚͕ग़དྷΔπʔϧ w ܕఆٛϑΝΠϧͱ3VCZίʔυ͔ΒɺܕݕࠪΛߦ͏ w ܕఆٛϑΝΠϧಠࣗจ๏
w 3VCZʹࣅ͍ͯΔ͕ɺܕΛද͢ઐ༻ه๏͕͋Δ
©2018 Wantedly, Inc. 4UFFQͷܕఆٛϑΝΠϧ class Person @name: String @contacts: Array<Email
| Phone> def initialize: (name: String) -> any def name: -> String def contacts: -> Array<Email | Phone> def guess_country: -> (String | nil) end
©2018 Wantedly, Inc. 4UFFQͷ1SPT$POT w 1SPT w 3VCZͰ੩తܕݕ͕ࠪग़དྷΔʂιϑτΣΞ։ൃͷॿ͚ʹͳͬͯ͘ΕΔʂ w $POT
w ܕఆٛϑΝΠϧͷઐ༻จ๏Λ֮͑Δඞཁ͕͋Δ w ܕఆٛϑΝΠϧΛ͔Βॻ͘ͷ͕େมʂ w ATUFFQTDB⒎PMEAίϚϯυ͕ॿ͚ʹͳͬͯ͘ΕΔ͕ɻɻɻ
©2018 Wantedly, Inc. Կ͔ྑ͍ํ๏ແ͍͔ʁ
©2018 Wantedly, Inc. 3VCZͰܕͱ͍͑:"3%ʜ :"3%ͰܕνΣοΫΛߦ͑ྑ͍ͷʁ
©2018 Wantedly, Inc. ͱ͍͏͜ͱͰɺ πʔϧΛ࡞ͬͯΈͨ
©2018 Wantedly, Inc.
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. ZBSETUFFQ
©2018 Wantedly, Inc. എܠ ZBSETUFFQͷ͝հ ·ͱΊ ࠓ͢༰
©2018 Wantedly, Inc. ZBSETUFFQͱ w 3VCZϓϩάϥϜதͷ:"3%Ξϊʔςʔγϣϯ ͔Βɺ4UFFQͷܕఆٛϑΝΠϧΛࣗಈੜ w 4UFFQͱΈ߹ΘͤΔࣄͰɺ:"3%Ͱ੩తܕݕ ࠪΛ࣮ݱʂ
©2018 Wantedly, Inc. %&.0
©2018 Wantedly, Inc. 3VCZίʔυΛ༻ҙ͢Δ # lib/parser.rb class AST # @return
[String] def to_s "AST" end # @param [Hash] opt def traverse!(opt) end end class Parser # @param [String] text # @param [Hash] opt # @return [AST] def parse(text, opt) ast = AST.new ast.traverse!(opt) ast end end
©2018 Wantedly, Inc. ZBSETUFFQίϚϯυΛ࣮ߦ $ yard2steep lib ZBSETUFFQͰܕఆٛϑΝΠϧΛੜ # sig/parser.rbi
class AST def to_s: -> String def traverse!: (Hash<any, any>) -> any end class Parser def parse: (String, Hash<any, any>) -> AST end
©2018 Wantedly, Inc. TUFFQͰܕνΣοΫ $ steep check lib ܕݕ͕ࠪ௨ΕɺԿग़ྗ͞Εͳ͍
©2018 Wantedly, Inc. Ͱɺܕݕ͕ࣦࠪഊ͢ΔέʔεͲ͏ͩΖ͏ʁ
©2018 Wantedly, Inc. ܕݕࠪͰࣦഊͤͯ͞ΈΔ # lib/parser.rb class AST # @return
[String] def to_s "AST" end # @param [Hash] opt def traverse!(opt) end end class Parser # @param [String] text - # @param [Hash] opt + # @param [Hash, nil] opt # @return [AST] - def parse(text, opt) + def parse(text, opt: nil) ast = AST.new ast.traverse!(opt) ast end end
©2018 Wantedly, Inc. ܕݕࠪͰࣦഊͤͯ͞ΈΔ $ yard2steep lib && steep check
lib lib/parser.rb:18:18: ArgumentTypeMismatch: receiver=::AST, expected=::Hash<any, any>, actual=(::Hash<any, any> | nil) (opt) ZBSETUFFQͱTUFFQΛΈ߹ΘͤͯܕνΣοΫ ͪΌΜͱɺAOJMAνΣοΫ͍ͯ͠ͳ͍ίʔυͰΤϥʔ ͕ग़ͨʂ
©2018 Wantedly, Inc. :"3%Ͱ੩తܕݕ͕ࠪग़དྷͯΔʂ
©2018 Wantedly, Inc. ࠷ۙͷΞοϓσʔτ w ϦϦʔεޙϲ݄Ͱͬͨ͜ͱ w BUUS@SFBEFSͳͲɺ3VCZͷΈࠐΈͷNFUBQSPHSBNNJOHܥͷػೳΛTVQQPSU w 3VCZQBSTFSͷվળ
ࣗલ࣮3JQQFSϕʔεҠߦ w ఆͷܕ͚ w FUD w Γ͍ͨ͜ͱ w :"3%BOOPUBUJPOͷϦονͳه๏Λαϙʔτ w BUSS@XSJUFS BUUS@BDDFTTPSͳͲͷTVQQPSU
©2018 Wantedly, Inc. എܠ ZBSETUFFQͷ͝հ ·ͱΊ ࠓ͢༰
©2018 Wantedly, Inc. ·ͱΊ w :"3%Ͱ੩తܕݕ͕ࠪͰ͖ΔΑ͏ʹͳͬͨʂ w 4UFFQͱZBSETUFFQΛΈ߹ΘͤΔࣄͰ࣮ݱ w BOZܕ͕͋ΔͷͰɺগͣͭ͠ಋೖ͕Մೳ
w ͜Ε͔Βɺ3VCZͰ)BQQZ)BDLJOH͠Α͏ʂ