;; This Source Code Form is subject to the terms of the Mozilla Public ;; License, v. 2.0. If a copy of the MPL was not distributed with this ;; file, You can obtain one at http://mozilla.org/MPL/2.0/. ;; ;; Copyright (c) KALEIDOS INC (ns app.plugins.utils "RPC for plugins runtime." (:require [app.util.object :as obj])) (defn get-data ([self attr] (-> (obj/get self "_data") (get attr))) ([self attr transform-fn] (-> (get-data self attr) (transform-fn)))) (defn get-data-fn ([attr] (fn [self] (get-data self attr))) ([attr transform-fn] (fn [self] (get-data self attr transform-fn))))