概要 Ghostableでゴーストメソッドを少しだけ楽に作成 内容 ゴーストメソッドの定義を支援するモジュール=Ghostableを作成します。 今回想定するのはあるパターンの文字列を持つメソッド名のみゴーストメソッドとして扱います。 通常のゴーストメソッド ソースコード # encoding: utf-8 module Lawable def method_missing(method_name, *args, &block) lawnized_call method_name.to_s if method_name.to_s.include?("呼ぶ") end def lawnized_call(name) puts "create new method = #{name}" singleton_class.class_eval do define_method name do na

