{"blog_url":"https://gom.hatenablog.com/","blog_title":"gom68\u306e\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/gom68/","version":"1.0","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","image_url":null,"height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20090401%2F1238603950\" title=\"define_method \u3063\u3066\u306a\u3093\u305e\u3084 - gom68\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"rails\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u8997\u3044\u3066\u305f\u3089\u3001eval\u7cfb\u30e1\u30bd\u30c3\u30c9\u304c\u3082\u3063\u3055\u308a\u51fa\u3066\u304d\u3066\u308f\u3051\u306e\u308f\u304b\u3089\u306a\u3044\u3053\u3068\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u8272\u3005\u5fa9\u7fd2\u3002\u307e\u305a\u306fdefine_method\u3002 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30e1\u30bd\u30c3\u30c9 name \u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u3092\u4e0e\u3048\u305f\u5834\u5408\u3001\u5b9a\u7fa9\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u30d6\u30ed\u30c3\u30af\u304c\u30ec\u30b7\u30fc\u30d0\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4e0a\u3067 Object#instance_eval \u3055\u308c\u307e\u3059\u3002 instance method Module#define_method #!/usr/bin/env ruby module Hoge def define (bar) define_method(\"#{bar}=\") do |value| @val \u2026","type":"rich","url":"https://gom.hatenablog.com/entry/20090401/1238603950","author_name":"gom68","categories":["ruby"],"published":"2009-04-01 01:39:10","width":"100%","title":"define_method \u3063\u3066\u306a\u3093\u305e\u3084"}