Slide 1

Slide 1 text

mrbgemΛ࡞ͬͯΈͨ Fukuoka.rb 200ճ LTେձ OKURA Masafumi, 2021-03-24

Slide 2

Slide 2 text

@okuramasafumi.inspect • ໊લɿେ૔խ࢙ • ॴଐɿϑϦʔϥϯε • ίϛϡχςΟࢀՃɿແ਺ʢfukuoka.rb͸໿20ճࢀՃʣ • ՝֎׆ಈɿKaigi on Rails, Grow.rb, Entaku.rb • ࣗ࡞ͷgemɿAlba, neco, rubocop-sensibleͳͲ • ࣗ࡞ͷmrbgemɿmruby-malba, mruby-factory

Slide 3

Slide 3 text

mrubyʹ͍ͭͯ

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Slide 6

Slide 6 text

ཁ͸૊ΈࠐΈ޲͚ͷRuby

Slide 7

Slide 7 text

mrbgemʹ͍ͭͯ

Slide 8

Slide 8 text

mrbgemͱ͸ • mruby༻ͷgem • RubyͱCͰॻ͚Δ • Gemͱ͍ͬͯ΋CRubyͷgemͱ͸৭ʑҧ͏ʢͲ͏ҧ͏ͷ͔આ໌Ͱ͖ Δ΄ͲཧղͰ͖͍ͯͳ͍…ʣ

Slide 9

Slide 9 text

mrbgemΛ࡞ͬͯΈͨײ૝

Slide 10

Slide 10 text

͍͚Δɺ͍͚Δͧʂ ʢιʔείʔυΛίϐϖ͠ͳ͕Βʣ

Slide 11

Slide 11 text

͍ͱ΋ͨ΍͘͢ൃੜ͢Δ NoMethodError

Slide 12

Slide 12 text

ͳ͔ͥʁ

Slide 13

Slide 13 text

mruby͸σϑΥϧτͰ͸CRubyͷ͢΂ ͯͷػೳΛ࢖͏͜ͱ͸Ͱ͖ͳ͍

Slide 14

Slide 14 text

mrbgemΛadd_dependency͢Δ

Slide 15

Slide 15 text

mruby-malbaͷ৔߹

Slide 16

Slide 16 text

# mrbgem.rake MRuby::Gem::Specification.new('mruby-malba') do |spec| spec.license = 'MIT' spec.authors = 'OKURA Masafumi' spec.add_dependency 'mruby-hash-ext' spec.add_dependency 'mruby-json' spec.add_dependency 'mruby-object-ext' spec.add_dependency 'mruby-class-ext' # Test spec.add_dependency 'mruby-proc-ext' spec.add_dependency 'mruby-print' end

Slide 17

Slide 17 text

Ұߦղઆ • mruby-hash-extɿHash#transform_valuesͳͲΛ௥Ճ͢Δ • mruby-object-extɿBasicObject#instance_execͳͲΛ௥Ճ͢Δ • mruby-class-extɿClass#<=ͳͲΛ௥Ճ͢Δ • mruby-proc-extɿKernel#procͳͲΛ௥Ճ͢Δ • mruby-printɿKernel#putsͳͲΛ௥Ճ͢Δ

Slide 18

Slide 18 text

Ͳ͏΍ͬͯඞཁͳmrbgemΛ୳͢ͷʁ

Slide 19

Slide 19 text

৬ਓͷצ

Slide 20

Slide 20 text

mrubyΛϏϧυ͢Δͱɺ”build summary”ͷ߲໨ʹ૊ΈࠐΈͷ mrbgemҰཡ͕ग़ΔͷͰɺ͔ͦ͜Βͦ ΕͬΆ͍΋ͷΛ୳͢

Slide 21

Slide 21 text

ਖ਼௚ɺख୳Γͷ໘͸͋Δͱࢥ͏

Slide 22

Slide 22 text

RubyͷϑϩϯςΟΞ͕͜͜ʹ͋Δʂ