1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 package Arvados::ResourceAccessor;
13 bless ($self, $class);
15 $self->{'api'} = shift;
16 $self->{'resourcesName'} = shift;
17 $self->{'methods'} = $self->{'api'}->{'discoveryDocument'}->{'resources'}->{$self->{'resourcesName'}}->{'methods'};
18 my $method_name, $method;
19 while (($method_name, $method) = each %{$self->{'methods'}}) {
20 $self->{$method_name} = Arvados::ResourceMethod->new($self, $method);