Class: Fog::Compute::Google::TargetInstances
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Google::TargetInstances
- Defined in:
- lib/fog/google/models/compute/target_instances.rb
Instance Method Summary collapse
Instance Method Details
#all(zone = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fog/google/models/compute/target_instances.rb', line 10 def all(zone = nil) if zone.nil? data = [] data = service.list_target_instances.body['items'] || [] else data = service.list_target_instances(zone).body['items'] || [] end load(data) end |
#get(identity, zone = nil) ⇒ Object
21 22 23 24 |
# File 'lib/fog/google/models/compute/target_instances.rb', line 21 def get(identity, zone=nil) response = service.get_target_instance(identity, zone) new(response.body) unless response.nil? end |