lib/fog/aliyun/models/compute/vswitches.rb in fog-aliyun-0.1.0 vs lib/fog/aliyun/models/compute/vswitches.rb in fog-aliyun-0.2.0
- old
+ new
@@ -15,29 +15,29 @@
#
# ==== Returns
#
# Returns the details of the new VPC
#
- #>> Aliyun.vpcs.new
+ # >> Aliyun.vpcs.new
# <Fog::Aliyun::VPC::VPC
# id=nil,
# state=nil,
# cidr_block=nil,
# dhcp_options_id=nil
# tags=nil
# tenancy=nil
# >
-
+
# Returns an array of all VPCs that have been created
#
# Aliyun.vpcs.all
#
# ==== Returns
#
# Returns an array of all VPCs
#
- #>> Aliyun.vpcs.all
+ # >> Aliyun.vpcs.all
# <Fog::Aliyun::VPC::VPCs
# filters={}
# [
# <Fog::Aliyun::VPC::VPC
# id="vpc-12345678",
@@ -45,11 +45,11 @@
# >
# ]
# >
#
- def all(options={})
+ def all(options = {})
requires :vpc
data = Fog::JSON.decode(service.list_vswitchs(vpc.id, options).body)['VSwitches']['VSwitch']
load(data)
end
@@ -59,20 +59,20 @@
# You can run the following command to get the details:
# Aliyun.vpcs.get("vpc-12345678")
#
# ==== Returns
#
- #>> Aliyun.vpcs.get("vpc-12345678")
+ # >> Aliyun.vpcs.get("vpc-12345678")
# <Fog::Aliyun::Compute::VPC
# id="vpc-12345678",
# TODO
# >
#
def get(vswitchId)
requires :vpc
if vswitchId
- self.class.new(:service => service,:vpc=>vpc).all(:vSwitchId=>vswitchId)[0]
+ self.class.new(service: service, vpc: vpc).all(vSwitchId: vswitchId)[0]
end
end
end
end
end