Class: ZAWS::External::AWSCLI::Generators::Result::Route53::HostedZones
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Generators::Result::Route53::HostedZones
- Defined in:
- lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb
Instance Method Summary collapse
- #add(hostedZones) ⇒ Object
- #get_hostedZones_array ⇒ Object
- #get_json ⇒ Object
- #id(hosted_zone_number, id) ⇒ Object
-
#initialize ⇒ HostedZones
constructor
A new instance of HostedZones.
- #name(hosted_zone_number, name) ⇒ Object
- #resize_hostedZones_array(index) ⇒ Object
Constructor Details
#initialize ⇒ HostedZones
Returns a new instance of HostedZones.
8 9 10 11 12 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 8 def initialize @hostedZones= {} @hostedZones["HostedZones"]= [] self end |
Instance Method Details
#add(hostedZones) ⇒ Object
32 33 34 35 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 32 def add(hostedZones) @hostedZones["HostedZones"].concat(hostedZones.get_hostedZones_array) self end |
#get_hostedZones_array ⇒ Object
41 42 43 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 41 def get_hostedZones_array @hostedZones["HostedZones"] end |
#get_json ⇒ Object
37 38 39 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 37 def get_json @hostedZones.to_json end |
#id(hosted_zone_number, id) ⇒ Object
14 15 16 17 18 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 14 def id(hosted_zone_number, id) resize_hostedZones_array(hosted_zone_number) @hostedZones["HostedZones"][hosted_zone_number]["Id"]=id self end |
#name(hosted_zone_number, name) ⇒ Object
20 21 22 23 24 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 20 def name(hosted_zone_number, name) resize_hostedZones_array(hosted_zone_number) @hostedZones["HostedZones"][hosted_zone_number]["Name"]=name self end |
#resize_hostedZones_array(index) ⇒ Object
26 27 28 29 30 |
# File 'lib/zaws/external/awscli/generators/result/route53/hosted_zones.rb', line 26 def resize_hostedZones_array(index) while index > @hostedZones["HostedZones"].length-1 @hostedZones["HostedZones"].push({}) end end |