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
yoshihiroUeki
June 27, 2020
1
610
プロを目指す人の為のRuby入門を学んでつまずいたところ
どう理解しようとしたか発表します
yoshihiroUeki
June 27, 2020
Tweet
Share
More Decks by yoshihiroUeki
See All by yoshihiroUeki
GitとGitHubの歴史と人間ドラマ
yoshihiroueki
1
910
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Building Applications with DynamoDB
mza
90
6.1k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Into the Great Unknown - MozCon
thekraken
32
1.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Navigating Team Friction
lara
183
14k
A designer walks into a library…
pauljervisheath
202
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Transcript
ϓϩΛࢦ͢ਓͷͨΊͷ Rubyೖ (νΣϦʔຊ) ΛֶΜͰͭ·͍ͣͨͱ͜Ζ
ࣗݾհ ২ ٛ५ twitter @yoshihiroUeki ϑΟϤϧυϒʔτΩϟϯϓͰ ֶΜͰ·͢
͡Ίʹ
νΣϦʔຊಡΜͰ͍ͯͭ·͍ͣͯຊͱ ʹΒΊͬ͜͢Δࣄ͕͋Γɺ ͜͏Ώ͏ֶͼํΛ͢Εྑ͔ͬͨͳʔͬͱ ࢥͬͨࣄΛൃද͍ͨ͠ͱ͓͍·͢
ൃදͷྲྀΕ ͡Ίʹ ൃදͷྲྀΕͷઆ໌ ͭ·͍ͣͨॴͷઆ໌ ͜͏Ώ͏ֶͼํΛ͢Εྑ͔ͬͨࣄ:ରࡦᶃʙᶉ ·ͱΊ ࠓ͜͜
త νΣϦʔຊΛ͜Ε͔ΒಡΉਓ ࠓಡΜͰΔਓ ͏Ұ෮श͠Α͏ͱ͍ͯ͠Δਓ ಉ͡ॴͰͭ·͍͍ͮͯΔ͔Εͳ͍ͷͰڞ༗ ͠Α͏ͱࢥ͍·ͨ͠
ҙ RubyΛҰ௨ΓֶΜͰ͍Δ͔ͨಘΒ ΕΔࣄগͳ͍͔Ͱ͢
ͭ·͍ͣͨॴ 7ষ 7.4.3 ྫɿɹվࡳػϓϩάϥϜ
ൃදͷεϥΠυʹ͋Δίʔυʹ͍ͭͯ ϓϩΛࢦ͢ਓͷͨΊͷRubyೖͷ7ষɺ 7.4.3ɹྫɿվࡳػϓϩάϥϜͷίʔυΛҾ༻͍ͯ͠·͢ɻ
γφϦΦʁ
ӡ͕Γ͍ͯΔ͔Ͳ͏͔Λผ͢Δ 150ԁͷූΛߪೖ͢Δ കాͰೖ͠ɺࡾࠃͰग़͢Δ ظ͢ΔޮՌ:ग़Ͱ͖ͳ͍
ͦͯࣸ͠ܦ͠·ͨ͠
ຊॻʹ͋Δ γʔέϯεਤΛݟΔ
ࣸܦͨ͠ίʔυͱ γʔέϯεਤ ΈͯΘ͔Βͳ͍
ςετίʔυͰ ΤϥʔͰΔ
Ͳ͏͠Α͏ʙ
͚͕࣌ؒͩա͗Δ
͜͏Ώ͏ֶͼ͔ͨ ͢Εྑ͔ͬͨࣄ
ରࡦᶃ
·ͣຊΛ ࠷ޙ·Ͱ ಡΈΔ
ࣸܦͨ͠ίʔυͷ ޡΓʹؾ͚ͮΔ
ҰΜͰ͍ΔՕॴΛ ΕͯΈΔࣄͰ ؾ͚Δࣄ͕͋Δ
ରࡦᶄ
ࣗͰγʔέϯεਤ Λ͔͍ͯΈΔ
None
গͣͭ͠Πϝʔδ͕ ௫ΜͰ͘Δ
ରࡦᶅ
ίϝϯτ͢Δ
Ҏલ
None
Մಡੑ͋͛ΔͨΊʹ ίϝϯτ߇͚͑ͯͨ Ͳ
ਓʹݟͤͣʹ͕ࣗ ཧղ͢ΔҝͩͬͨΒ ͍͍͔
·ͩश͍ͨͯͷਓ
None
ରࡦᶆ
ෳͷίʔυΛ දࣔͤ͞Δ
Ҏલ
̍ͭ̍ͭ ϑΝΠϧΛ ։͍ͯͨ
None
None
None
Πϝʔδ͕ͭ ͔Ίͳ͍
ෳͷϑΝΠ ϧΛදࣔ
None
ෳදࣔ͢ࣄͰ Ѳ͍͢͠ʂ
ରࡦᶇ
γʔέϯεਤͱ ίʔυΛࢦ͞͠ͳ͕Β ૾্ͷਓʹΛͩ͠ͳ͕ Βઆ໌͢Δ
ࢦΛ͞͠ͳ͕Βઆ໌͢ ΔաఔͰ಄ͷத͕ཧ ͞ΕΔ
Կ͕ཧղͰ͖ͯͳ͍͔ ໌֬ʹͳΔ
ରࡦᶈ
ίʔυΛݱ࣮ੈք ʹӨͤ͞Δ
ྫ͑ͪ͜Βͷ ίʔυ
None
umeda = Gate.new(:umeda) Ͱകా(umeda)ʹվࡳ͕Ͱ͖Δɻ ेࡾ(juso).newͰಉ͡Α͏ʹͰ͖ Δɻ Ticket.newͰ150ԁͷූΛߪೖ ͢Δɻ ͱ͍͏ྲྀΕͰݱ࣮ʹകా͔Βɺ ූΛങͬͯվࡳ௨ͯ͠ɺվࡳΛग़
ΔͱΠϝʔδͯ͠ΈΔɻ
खॻ͖Ͱॻ͍ͨ γʔέϯεਤ
None
ͱ
None
ίʔυΛݟൺͳ͕Β ૾ͯ͠ΈΔͱཧղ ͕ਐΉ
ରࡦऴΘΓ
ͦΕͰཧղᘳͰ ͢Ͷʁ
ͱݴΘΕΔͱࣗ৴ ͳ͍
͚ͲɺςΩετͱʹΒΊͬͯ͜͠ ͍ͨҎલͱൺΕཧղਐΜͩ ͱ͓͍·͢
·ͱΊ
৭ʑͳ͔֯Β ཧղ͢Δͷ େͩͱֶͼ·ͨ͠
ࣗҰਓͩͱ ৭ʑͳ͔֯Βཧղͷํ͢Δൃ ͜͜·Ͱੜ·Εͳ͔͔ͬͨͰ͢
ΞυόΠεΛ͘Εͨ ͕͍ؒͯ͘Εͯ ຊʹײँͰ͢
ऴΘΓ ͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠