's Picture

Kevin

Rubyist, Backend Engineer

  • Home
  • About
  • Project
  • Contact Me
  • Search

Method Missing

A collection of 2 posts

October 22, 2020

Ruby 學習筆記簿:Metaprogramming Workshop - The Legacy System

本篇要分享的是此書(在第三章)我蠻喜歡的範例之一,作者以說故事的方式講解本章節所介紹的題目,假設的情境是新進員工被會計部門賦予一項任務,目標是找出花費大於美金$99元的電腦配件。

Ruby Define_method Dynamic Methods Method Missing Methods

October 17, 2020

Ruby 學習筆記簿:Metaprogramming Ruby - Chapter 3 - Part III

Chapter 3: Methods - Part III 還記得在 Chapter 2 提過的 “method lookup” 嗎?是否有想過當不存在的方法被呼叫時,Ruby 的方法查詢流程會變得怎麼樣呢?今天就要來介紹 Ruby 在 BasicObject 內建的一個方法 - Method Missing 

Ruby Method Missing Ghost Methods

Subscribe to Kevin newsletter

Get the latest and greatest from Kevin delivered straight to your inbox every week.

Kevin © 2022. Royce theme by JustGoodThemes.
Powered by Jekyll.

Back to top