Skip to content

Instantly share code, notes, and snippets.

@elhu
Created October 29, 2012 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elhu/3973143 to your computer and use it in GitHub Desktop.
Save elhu/3973143 to your computer and use it in GitHub Desktop.
Method missing with module
def method_missing(method, *args, &block)
begin
super
rescue NoMethodError => e
warn("Warning: Unknown field or method #{method} for object #{self.inspect}\nBacktrace:\n#{e.backtrace.join("\n")}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment