module ActiveRecord::DynamicMatchers

def method_missing(name, *arguments, &block)

def method_missing(name, *arguments, &block)
  match = Method.match(self, name)
  if match && match.valid?
    match.define
    send(name, *arguments, &block)
  else
    super
  end
end

def respond_to?(name, include_private = false)

def respond_to?(name, include_private = false)
  match = Method.match(self, name)
  match && match.valid? || super
end