Slide 1

Slide 1 text

ࠇྺ࢙ϦϙδτϦΛ ࢖ͬͨϦϑΝΫλϦϯά ษڧ๏ͷεεϝ ɹɹɹɹɹɹɹɹ fuqda(@fuqda90) 2019.08.14(Wed) Otemachi.rb#20

Slide 2

Slide 2 text

ࣗݾ঺հ 
 Tama.rb Organizor
 Work @ STORES.jp, inc.
 RubyͰ!Λ৯΂ΔΑ͏ʹͳΓ2೥໨Ͱ͢ Twitter : fuqda(@fuqda90)
 Github : Shigeyuki-fukuda (JU)VC

Slide 3

Slide 3 text

ࠓ೔ͷ࿩

Slide 4

Slide 4 text

௚࣮ۙફͨ݁͠Ռ
 ޮՌ͕͋ͬͨΦεεϝ ษڧ๏ͷ࿩"

Slide 5

Slide 5 text

ʲ࣭໰ʳ
 ٕज़ॻಡΜͩޙ ࣮ફͯ͠·͔͢ʁ

Slide 6

Slide 6 text

ʲ࣭໰2ʳ
 ಡΜ͚ͩͩͩͱ਎ʹ෇͍͔ͨෆ҆… ͱ͍͏͔…๨Ε·ͤΜ͔? (ͪͳΈʹ๻͸ͦ͏Ͱ͢#)

Slide 7

Slide 7 text

ؾܰʹຊͰֶΜͩ಺༰Λ
 ࣮ફ͍ͨ͠

Slide 8

Slide 8 text

(࠷ѱյΕͯ΋ྑ͍ΞϓϦͰ$)

Slide 9

Slide 9 text

ͦ͜ͰΦεεϝ͍ͨ͠ʂ

Slide 10

Slide 10 text

ۦ͚ग़͠ͷࠒʹॻ͍ͨίʔυ
 (ࠇྺ࢙ϦϙδτϦ)ͷ ϦϑΝΫλϦϯά %✨

Slide 11

Slide 11 text

ཧ༝

Slide 12

Slide 12 text

୯७ʹϦϑΝΫλϦϯάग़དྷΔ༨஍͕ଟ͍ →௚͢༨஍͕গͳ͍ͱ࡞ۀͯͯͭ͠·Βͳ͍ͷͰ ɹۃ୺ʹ伱ͩΒ͚ͷίʔυΛϘίϘίʹ௚͘͢Β͍͕ ɹ୊ࡐͱͯ͠ྑ͍ ษڧΛͨ͠ݱ࣌఺ͱ͢Δલͷࠩ෼͕໌֬ →Ͳͷ͘Β͍਎ʹ෇͍͍ͯΔ͔ʁΛ஌͕ࣝͳ͔ͬͨࠒ ɹͱൺ΂Δ͜ͱͰݱঢ়ͷཧղ౓ͷ೺Ѳʹ໾ཱͪͦ͏

Slide 13

Slide 13 text

΋ͬͱݴ͏ͱ ϖΞϓϩͰ΍ΔͷΛ Φεεϝ͍ͨ͠✋

Slide 14

Slide 14 text

ϖΞϓϩͰ΍Δํ͕͍͍ཧ༝ ࢥߟͷ੔ཧ͕ग़དྷΔ →ҰਓͩͱԿͱͳͬͪ͘͜ͷίʔυͷํ͕ྑ͍͔Βͱ ɹᐆດʹ͢Δͱ͜ΖΛ૬ख͕͍ΔͱԿނͦͷॻ͖ํ͕ ɹྑ͍ͷ͔Λઆ໌͢Δඞཁ͕ग़ͯ͘Δʂ ɹͦͷͨΊઆ໌ͷաఔͰᐆດͳཧղʹؾ෇͚ͯྑ͍ →૬खͱࣗ෼ͰΞϓϩʔν͕ҧ͏৔໘͕͋Δ͸ͣͳͷͰ ɹͦΕ͕ͦͷ··ֶͼʹͳΔ

Slide 15

Slide 15 text

࣮ࡍʹ΍͍ͬͯͬͨ͜ͱ

Slide 16

Slide 16 text

Tama.rbͷ˞ࣗݾ঺հ༻ΨνϟΞϓϦͷ
 ϦϑΝΫλϦϯά ※Tama.rbؔ܎ऀͷ๭ࢯ͕ۦ͚ग़͠ͷࠒʹ ࡞ͬͨΞϓϦΛڐՄΛ΋Βͬͯ௚͢͜ͱʹ… ϝϯόʔ @fuqda @ken3ypa

Slide 17

Slide 17 text

ʲΞϓϦ֓ཁʳ ࣗݾ঺հΨνϟ ɾQuestion(࣭໰) ɾConjunction(઀ଓࢺ) ɾTheme(ςʔϚ) ͜ΕΒͷΧςΰϦʔʹ֘౰͢Δొ࿥ϫʔυΛ ΨνϟͷΑ͏ʹҾ͍ͯ ϥϯμϜͰը໘ʹදࣔ͠ ͦΕΛݩʹࣗݾ঺հͯ͠΋Β͏ΞϓϦ

Slide 18

Slide 18 text

ϦϑΝΫλϦϯάͷΰʔϧ ៉ྷͳίʔυʹ௚͢(ͦΕ͚ͩ͡Όͳ͍) ⭕ ۦ͚ग़͔͠Βࠓ·ͰֶΜͩΦϒδΣΫτ ࢦ޲ͷΞϨίϨ΍֤छॻ੶ͷֶश಺༰Λ Ξ΢τϓοτग़དྷΔ͔ΛϦϑΝΫλϦϯά ͷதͰ֬ೝ͢Δ͜ͱ

Slide 19

Slide 19 text

ϦϑΝΫλϦϯά͢Δ ্ͰνΣοΫ߲ͨ͠໨

Slide 20

Slide 20 text

ɾ໋໊ͷଥ౰ੑνΣοΫ ɹ (Ϋϥε໊ɾϝιου໊ɾΧϥϜ໊etc…) ͦͷ໊લͰ఻ΘΔʁ ex)ͱ͋ΔϕϯνϟʔاۀͰϗϯτʹ͋ͬͨා໋໊͍ class EmailMailer →Կʹର͢Δϝʔϧ͕͍ͨ͠Ϋϥεͳͷ͔શ͘఻ΘΒΜ ޿͗͢Δ໋໊͡Όͳ͍ʁ ex) Ϋϥε໊ɿGroup, Operation →޿໊͍લʹ͸prefix͕ඞཁͦ͏ γεςϜ্Ϳ͔ͭΔ໊લ͡Όͳ͍ʁ ex) ΧϥϜ໊ɿsize, count →ͦͷੲ๭ϑΝογϣϯܥαʔϏεͰ෰ͷαΠζΛsizeͱ͍͏ ΧϥϜͰ؅ཧͨ͠ͱ͜ΖORϚούʔͷ಺෦ͷϝιουͱ Ϳ͔ͭͬͯҙਤ͠ͳ͍ڍಈΛͨ͜͠ͱ͕͋ͬͨͦ͏ͳ

Slide 21

Slide 21 text

ɾΫΤϦͷଥ౰ੑνΣοΫ

Slide 22

Slide 22 text

ɾϞσϦϯάͷଥ౰ੑνΣοΫ ຊ౰ʹ͜ͷϞσϧඞཁʁ →QuestionϞσϧҰͭʹ ɹ ActiveRecord::EnumΛੜ΍ͯ͠؅ཧ͢Ε͹ ɹ Conjunction(઀ଓࢺ)ͱ ɹ ThemeϞσϧෆཁͳͷͰ͸ʁ ※Πϝʔδ enum category: { conjunction: 0, theme: 1 }

Slide 23

Slide 23 text

ɾRailsత/OOPత͔νΣοΫ ੹຿͕ద੾ʹ෼ׂ͞ΕͯΔʁ →AΫϥε͕BΫϥεͷதͷॲཧΛ஌Γա͗ͯͳ͍͔ →ԿͰ΋԰ͷαʔϏεΫϥεͱ͔࡞ͬͯͨΒຣࡴ(ࠓճ͸ແ͠) ͜ͷ࣮૷ͳ͍ͱμϝʁ →ෳ਺ͷϞσϧͰڞ௨ͨ͠ॲཧ͕ ɹActiveSupport::Concernʹ·ͱΊΒΕ͍͕ͯͨ ͦ΋ͦ΋ແବͳϞσϧΛ࡟আͨ͠Β ActiveSupport::Concern͍Βͳ͘ͳ͍ʁ^_^; ɹ➡ ຣࡴ

Slide 24

Slide 24 text

૯࿦

Slide 25

Slide 25 text

ɾϦϑΝΫλϦϯάͰग़ͯ͘ΔΞΠσΞ ɹͦͷ΋ͷ͕ࠓͷࣗ෼ͷ࣮ྗ ɾۀ຿ͩͱେਓͷࣄ৘ͰϦϑΝΫλϦϯάʹ ɹͳ͔ͳ͔खΛ෇͚ΒΕͳ͍͔΋ͳͷͰ… झຯͷίʔυͰͿͬյ͠ͳ͕ΒֶΜͰ ɹۀ຿ίʔυʹ΋൓өग़དྷͨΒྑͦ͞͏✨ ɾϖΞϓϩɾϞϒϓϩͰࠓճͷΑ͏ͳϦϑΝΫλϦϯάΛ ͢Δͱ୯७ʹָ͍͠ & ษڧʹͳΔͷͰ ೔ʑͷֶशϚϯωϦଧഁʹ͓ࢼ͋͠Ε

Slide 26

Slide 26 text

͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠3 ͝ਗ਼ௌ