 
 (defmethod evaluate-one :method-def [system stmt]
   (let [[_ name args & body] stmt]
-    (swap! (:methods system) assoc name body)))
+    (swap! (:variables system) assoc-in ["self" :methods name] body)))
 
 (defn evaluate [system stmt]
   (try


(defn evaluate-all [create-string create-number as-host-boolean initial-variables stmts]
  (let [system {:variables (atom initial-variables)
                :methods (atom {})
                :create-string create-string
                :create-number create-number
                :as-host-boolean as-host-boolean}]

(defn evaluate-body [system body]
  (mapv (partial evaluate system) body))

(defn method-lookup [obj method-name]
  (get-in obj [:methods method-name]))

(defn ruby-msg [system obj method-name args]
  (if-let [meth (method-lookup obj method-name)]
    (if (fn? meth)
      (apply meth system obj args)
      (evaluate-body system meth))
    (throw (ex-info "Method lookup failed" {:object obj, :method method-name}))))

(defmulti evaluate-one (fn [vars stmt] (first stmt)))
