Class: Fog::Compute::Google::Projects

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/compute/google/models/projects.rb

Instance Method Summary collapse

Instance Method Details

#get(identity) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/fog/compute/google/models/projects.rb', line 7

def get(identity)
  if identity
    project = service.get_project(identity).to_h
    return new(project)
  end
rescue ::Google::Apis::ClientError => e
  raise e unless e.status_code == 404
  nil
end