Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
method_missing is still considered scary, but here’s something more scary: forgetting to override respond_to?. Whoa, right? Just gave you an anxiety attack there. How about #method, though? Does that still work? Go ahead, try it. Here, I’ll try it with you: require 'ostruct' class Order def user @_user ||= OpenStruct.new(name: 'Mike', age: 28, occupation: 'slacker') end def method_missing(method_n
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く