Public: Fetches a scope.

 Finds an object. If it isn't found, the object gets instantiated.

 Returns the decorated object.
506773
def fetch
      instance = id ? find(id, computed_scope) : build(build_params, computed_scope)
      decorate(instance)
    end
134404
def load_object(self, obj):
        
        locator = self._make_locator()

        path = locator.find_object(obj, self.search_dirs)

        return self.read(path)
10539
public Object get(Object key) {
		for (Scope cur=this; cur!=null; cur=cur.parent) {
//			if (cur.data != null && cur.data.containsKey(key)) {
//				return cur.data.get(key);
//			}
			
			if (cur.data != null) {
				Object ret = cur.data.get(key);
				if (ret != null) {
					return ret;
				}
				
				if (cur.data.containsKey(key)) {
					return null;
				}
			}
		}
		// return null;
		return sharedObjectMap != null ? sharedObjectMap.get(key) : null;
	}
13181
def get(self, obj, cls):
    
    method = self._cache.get(cls)
    if not method:
      name = "visit_" + cls.__name__.lower()
      method = getattr(obj, name, obj.visit_default)
      self._cache[cls] = method
    return method
702586
def fetch_index_objects
      scope = index_properties.default_scope
      puts "<<<<<<<" * 100, scope
      if !scope.nil?

          # If user provided an scope for `index` section.

          if scope.respond_to? :call
            # If scope provided by a block
            scope = scope.call
          else
            # If scope provided by a symbol
            # which should be a method name
            scope = self.send(scope)
          end

        else
          scope = model.all
          #scope = ApplicationPolicy::Scope.new(current_user, model.all).resolve
        end

        scope = scope.order('created_at DESC').page(params[:page])
        policy_scope(scope)

      end
1093635
def lookup_in_scope(name, scope)
      loop do
        tn = scope.path_with_task_name(name)
        task = @tasks[tn]
        return task if task
        break if scope.empty?
        scope = scope.tail
      end
      nil
    end
1349466
def extract_scopes(self, request):
        
        payload = self.extract_payload(request)
        if not payload:
            return None

        scopes_attribute = self.config.scopes_name()
        return payload.get(scopes_attribute, None)
417674
def _get_scope_with_symbol(self, name):
        """"""
        scope = self
        while True:
            parent = scope.get_enclosing_scope()
            if parent is None:
                return

            if name in parent.symbols:
                return parent

            scope = parent
348124
def get_object(self, *args, **kwargs):
        
        self.category_instance = get_object_or_404(Category, slug=self.kwargs['category_slug'])
        return get_object_or_404(Post, thread__id=self.kwargs['thread_id'], thread__category=self.category_instance, pk=self.kwargs['post_id'])
879663
def get_object(
        self, object_t, object_id=None, relation=None, parent=None, **kwargs
    ):
        
        url = self.object_url(object_t, object_id, relation, **kwargs)
        logging.debug(url)
        response = yield self._async_client.fetch(url)
        resp_str = response.body.decode("utf-8")
        jsn = json.loads(resp_str)
        result = self._process_json(jsn, parent)
        raise Return(result)
1149022
def get_object(context):
    
    object = None

    view = context.get('view')
    if view:
        # View is more reliable then an 'object' variable in the context.
        # Works if this is a SingleObjectMixin
        object = getattr(view, 'object', None)

    if object is None:
        object = context.get('object', None)

    return object
559490
def get_scope(self, scope_name):
        """"""
        request_url = self._build_url(['Scope', scope_name])
        return self._do_request('GET', request_url)
1316427
def fetch_external
        object.controlled_properties.each do |property|
          object[property].each do |value|
            resource = value.respond_to?(:resource) ? value.resource : value
            next unless resource.is_a?(ActiveTriples::Resource)
            next if value.is_a?(ActiveFedora::Base)
            fetch_with_persistence(resource)
          end
        end
      end
1026381
public static Object getScopeService(IScope scope, Class<?> intf) {
        return getScopeService(scope, intf, null);
    }
262318
function() {
		var lastScope;

		// find the first reference scope
		var templateContext = this.getScope(function(scope) {
			lastScope = scope;
			return scope._context instanceof TemplateContext;
		});

		// if there is no reference scope, add one as the root
		if(!templateContext) {
			templateContext = new Scope(new TemplateContext());

			// add templateContext to root of the scope chain so it
			// can be found using `getScope` next time it is looked up
			lastScope._parent = templateContext;
		}
		return templateContext;
	}
1175629
def fetch(class_name, arg)
      the_class = JSS.api_object_class(class_name)
      the_class.fetch arg, api: self
    end
1282446
def get(self, request, *_args, **_kwargs):
        

        access_token = self.access_token

        scope_string = request.GET.get('scope')
        scope_request = scope_string.split() if scope_string else None

        claims_string = request.GET.get('claims')
        claims_request = json.loads(claims_string) if claims_string else None

        if not provider.scope.check(constants.OPEN_ID_SCOPE, access_token.scope):
            return self._bad_request('Missing openid scope.')

        try:
            claims = self.userinfo_claims(access_token, scope_request, claims_request)
        except ValueError, exception:
            return self._bad_request(str(exception))

        # TODO: Encode and sign responses if requested.

        response = JsonResponse(claims)

        return response