def load_resource(nsc, k, url)
      obj  = class_from_string(k)
      resp = AJAX.get(nsc, url, AJAX::CONTENT_TYPE::JSON)
      hash = JSON.parse(resp, symbolize_names: true)
      if hash.is_a?(Array)
        resources = hash.map { |e| obj.method(:new).call.object_from_hash(nsc, e) }
      elsif hash.key?(:resources)
        resources = hash[:resources].map { |e| obj.method(:new).call.object_from_hash(nsc, e) }
      else
        resources = obj.method(:new).call.object_from_hash(nsc, hash)
      end
      instance_variable_set("@#{k}", resources)
      self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
      resources
    end
def load_resource(nsc, k, url)
      obj  = class_from_string(k)
      resp = AJAX.get(nsc, url, AJAX::CONTENT_TYPE::JSON)
      hash = JSON.parse(resp, symbolize_names: true)
      if hash.is_a?(Array)
        resources = hash.map { |e| obj.method(:new).call.object_from_hash(nsc, e) }
      elsif hash.key?(:resources)
        resources = hash[:resources].map { |e| obj.method(:new).call.object_from_hash(nsc, e) }
      else
        resources = obj.method(:new).call.object_from_hash(nsc, hash)
      end
      instance_variable_set("@#{k}", resources)
      self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
      resources
    end
Load a resource from the security console. Once loaded, the value is
 cached so that it need not be loaded again.

 @param [Connection] nsc Active connection to the console.
 @param [Symbol] k Original key name, used to identify the class to load.
 @param [String] url Truncated URL to use to retrieve the resource.
 @return [Array[?]] Collection of "k" marshalled object.