Class: Fog::DNS::Google::Projects

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

Instance Method Summary collapse

Instance Method Details

#get(identity) ⇒ Fog::DNS::Google::Project

Fetches the representation of an existing Project

Parameters:

  • identity (String)

    Project identity

Returns:


12
13
14
15
16
17
18
19
# File 'lib/fog/dns/google/models/projects.rb', line 12

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