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
290
みんなに知って欲しい 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
8
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
770
実行計画から学ぶ PostgreSQL の内部動作とクエリ最適化 / Learn PostgreSQL from Explain
south37
8
39k
学びを得るための新卒 ISUCON / New Grad ISUCON for Learning
south37
4
42k
Other Decks in Programming
See All in Programming
From Translations to Multi Dimension Entities
alexanderschranz
2
130
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
450
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
700
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Symfony Mapper Component
soyuka
2
730
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Adopting Sorbet at Scale
ufuk
73
9.1k
The Invisible Side of Design
smashingmag
298
50k
How GitHub (no longer) Works
holman
311
140k
A designer walks into a library…
pauljervisheath
204
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
96
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
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͠Α͏ʂ