Class: Puppet::GoogleAPI::Compute::Networks
- Inherits:
-
Object
- Object
- Puppet::GoogleAPI::Compute::Networks
- Defined in:
- lib/puppet/google_api/compute.rb
Instance Method Summary collapse
- #get(project, name) ⇒ Object
-
#initialize(api, compute) ⇒ Networks
constructor
A new instance of Networks.
Constructor Details
#initialize(api, compute) ⇒ Networks
Returns a new instance of Networks.
274 275 276 277 |
# File 'lib/puppet/google_api/compute.rb', line 274 def initialize(api, compute) @api = api @compute = compute end |
Instance Method Details
#get(project, name) ⇒ Object
279 280 281 282 283 |
# File 'lib/puppet/google_api/compute.rb', line 279 def get(project, name) @api.execute(@compute.networks.get, project: project, network: name).first rescue nil end |