1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/google/models/compute/projects.rb
Ferran Rodenas edf799c4df [google|compute] Add Projects support
- Add "Projects" model and collection
- Add "get_project" request
- Add "set_common_instance_metadata" request
2014-04-09 17:53:38 -07:00

22 lines
420 B
Ruby

require 'fog/core/collection'
require 'fog/google/models/compute/project'
module Fog
module Compute
class Google
class Projects < Fog::Collection
model Fog::Compute::Google::Project
def get(identity)
if project = service.get_project(identity).body
new(project)
end
rescue Fog::Errors::NotFound
nil
end
end
end
end
end