Class: Fog::Vcloud::Compute::Organizations
- Inherits:
-
Fog::Vcloud::Collection
- Object
- Array
- Collection
- Fog::Vcloud::Collection
- Fog::Vcloud::Compute::Organizations
- Defined in:
- lib/fog/vcloud/models/compute/organizations.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Fog::Vcloud::Collection
Methods inherited from Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fog/vcloud/models/compute/organizations.rb', line 13 def all raw_orgs = if connection.version == '1.0' connection.login else connection.request(connection.basic_request_params("#{connection.base_path_url}/org/")) end data = raw_orgs.body[:Org].select { |org| org[:type] == "application/vnd.vmware.vcloud.org+xml" } data.each { |org| org.delete_if { |key, value| [:rel].include?(key) } } load(data) end |