gcloud 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. checksums.yaml +8 -8
  2. data/AUTHENTICATION.md +13 -9
  3. data/CHANGELOG.md +8 -3
  4. data/OVERVIEW.md +46 -8
  5. data/lib/gcloud.rb +123 -117
  6. data/lib/gcloud/backoff.rb +43 -15
  7. data/lib/gcloud/bigquery.rb +211 -195
  8. data/lib/gcloud/bigquery/connection.rb +9 -9
  9. data/lib/gcloud/bigquery/copy_job.rb +15 -16
  10. data/lib/gcloud/bigquery/credentials.rb +3 -3
  11. data/lib/gcloud/bigquery/data.rb +12 -11
  12. data/lib/gcloud/bigquery/dataset.rb +162 -216
  13. data/lib/gcloud/bigquery/dataset/access.rb +59 -43
  14. data/lib/gcloud/bigquery/dataset/list.rb +3 -3
  15. data/lib/gcloud/bigquery/errors.rb +9 -5
  16. data/lib/gcloud/bigquery/extract_job.rb +18 -18
  17. data/lib/gcloud/bigquery/insert_response.rb +7 -4
  18. data/lib/gcloud/bigquery/job.rb +48 -44
  19. data/lib/gcloud/bigquery/job/list.rb +3 -3
  20. data/lib/gcloud/bigquery/load_job.rb +24 -25
  21. data/lib/gcloud/bigquery/project.rb +145 -204
  22. data/lib/gcloud/bigquery/query_data.rb +10 -9
  23. data/lib/gcloud/bigquery/query_job.rb +23 -32
  24. data/lib/gcloud/bigquery/table.rb +238 -280
  25. data/lib/gcloud/bigquery/table/list.rb +3 -3
  26. data/lib/gcloud/bigquery/table/schema.rb +79 -87
  27. data/lib/gcloud/bigquery/view.rb +69 -82
  28. data/lib/gcloud/credentials.rb +3 -9
  29. data/lib/gcloud/datastore.rb +194 -170
  30. data/lib/gcloud/datastore/connection.rb +12 -8
  31. data/lib/gcloud/datastore/credentials.rb +6 -4
  32. data/lib/gcloud/datastore/dataset.rb +74 -141
  33. data/lib/gcloud/datastore/dataset/lookup_results.rb +6 -4
  34. data/lib/gcloud/datastore/dataset/query_results.rb +6 -4
  35. data/lib/gcloud/datastore/entity.rb +81 -76
  36. data/lib/gcloud/datastore/errors.rb +10 -8
  37. data/lib/gcloud/datastore/key.rb +41 -77
  38. data/lib/gcloud/datastore/properties.rb +3 -3
  39. data/lib/gcloud/datastore/proto.rb +7 -4
  40. data/lib/gcloud/datastore/query.rb +26 -3
  41. data/lib/gcloud/datastore/transaction.rb +12 -8
  42. data/lib/gcloud/dns.rb +180 -152
  43. data/lib/gcloud/dns/change.rb +16 -16
  44. data/lib/gcloud/dns/change/list.rb +3 -3
  45. data/lib/gcloud/dns/connection.rb +9 -10
  46. data/lib/gcloud/dns/credentials.rb +3 -3
  47. data/lib/gcloud/dns/errors.rb +9 -5
  48. data/lib/gcloud/dns/importer.rb +17 -23
  49. data/lib/gcloud/dns/project.rb +42 -64
  50. data/lib/gcloud/dns/record.rb +58 -46
  51. data/lib/gcloud/dns/record/list.rb +6 -7
  52. data/lib/gcloud/dns/zone.rb +198 -289
  53. data/lib/gcloud/dns/zone/list.rb +3 -3
  54. data/lib/gcloud/dns/zone/transaction.rb +56 -72
  55. data/lib/gcloud/errors.rb +174 -3
  56. data/lib/gcloud/gce.rb +3 -4
  57. data/lib/gcloud/grpc_utils.rb +76 -0
  58. data/lib/gcloud/logging.rb +308 -0
  59. data/lib/gcloud/logging/credentials.rb +29 -0
  60. data/lib/gcloud/logging/entry.rb +303 -0
  61. data/lib/gcloud/logging/entry/http_request.rb +141 -0
  62. data/lib/gcloud/logging/entry/list.rb +111 -0
  63. data/lib/gcloud/logging/entry/operation.rb +90 -0
  64. data/lib/gcloud/logging/logger.rb +307 -0
  65. data/lib/gcloud/logging/metric.rb +175 -0
  66. data/lib/gcloud/logging/metric/list.rb +98 -0
  67. data/lib/gcloud/logging/project.rb +650 -0
  68. data/lib/gcloud/logging/resource.rb +95 -0
  69. data/lib/gcloud/logging/resource_descriptor.rb +140 -0
  70. data/lib/gcloud/logging/resource_descriptor/list.rb +78 -0
  71. data/lib/gcloud/logging/service.rb +258 -0
  72. data/lib/gcloud/logging/sink.rb +233 -0
  73. data/lib/gcloud/logging/sink/list.rb +97 -0
  74. data/lib/gcloud/pubsub.rb +241 -199
  75. data/lib/gcloud/pubsub/credentials.rb +3 -3
  76. data/lib/gcloud/pubsub/message.rb +26 -20
  77. data/lib/gcloud/pubsub/project.rb +166 -233
  78. data/lib/gcloud/pubsub/received_message.rb +28 -38
  79. data/lib/gcloud/pubsub/service.rb +323 -0
  80. data/lib/gcloud/pubsub/subscription.rb +172 -242
  81. data/lib/gcloud/pubsub/subscription/list.rb +11 -9
  82. data/lib/gcloud/pubsub/topic.rb +152 -271
  83. data/lib/gcloud/pubsub/topic/batch.rb +66 -0
  84. data/lib/gcloud/pubsub/topic/list.rb +9 -7
  85. data/lib/gcloud/resource_manager.rb +158 -138
  86. data/lib/gcloud/resource_manager/connection.rb +6 -5
  87. data/lib/gcloud/resource_manager/credentials.rb +3 -3
  88. data/lib/gcloud/resource_manager/errors.rb +9 -5
  89. data/lib/gcloud/resource_manager/manager.rb +54 -86
  90. data/lib/gcloud/resource_manager/project.rb +69 -88
  91. data/lib/gcloud/resource_manager/project/list.rb +4 -5
  92. data/lib/gcloud/resource_manager/project/updater.rb +12 -14
  93. data/lib/gcloud/search.rb +158 -135
  94. data/lib/gcloud/search/api_client.rb +7 -7
  95. data/lib/gcloud/search/connection.rb +8 -8
  96. data/lib/gcloud/search/credentials.rb +3 -3
  97. data/lib/gcloud/search/document.rb +64 -87
  98. data/lib/gcloud/search/document/list.rb +5 -5
  99. data/lib/gcloud/search/errors.rb +9 -5
  100. data/lib/gcloud/search/field_value.rb +32 -38
  101. data/lib/gcloud/search/field_values.rb +50 -80
  102. data/lib/gcloud/search/fields.rb +44 -65
  103. data/lib/gcloud/search/index.rb +163 -204
  104. data/lib/gcloud/search/index/list.rb +5 -5
  105. data/lib/gcloud/search/project.rb +31 -47
  106. data/lib/gcloud/search/result.rb +27 -31
  107. data/lib/gcloud/search/result/list.rb +6 -6
  108. data/lib/gcloud/storage.rb +224 -190
  109. data/lib/gcloud/storage/bucket.rb +202 -227
  110. data/lib/gcloud/storage/bucket/acl.rb +83 -170
  111. data/lib/gcloud/storage/bucket/cors.rb +31 -34
  112. data/lib/gcloud/storage/bucket/list.rb +3 -3
  113. data/lib/gcloud/storage/connection.rb +11 -7
  114. data/lib/gcloud/storage/credentials.rb +3 -3
  115. data/lib/gcloud/storage/errors.rb +11 -8
  116. data/lib/gcloud/storage/file.rb +129 -171
  117. data/lib/gcloud/storage/file/acl.rb +51 -99
  118. data/lib/gcloud/storage/file/list.rb +3 -3
  119. data/lib/gcloud/storage/file/verifier.rb +3 -2
  120. data/lib/gcloud/storage/project.rb +111 -132
  121. data/lib/gcloud/upload.rb +4 -7
  122. data/lib/gcloud/version.rb +2 -4
  123. data/lib/google/api/annotations.rb +14 -0
  124. data/lib/google/api/http.rb +30 -0
  125. data/lib/google/api/label.rb +24 -0
  126. data/lib/google/api/monitored_resource.rb +25 -0
  127. data/lib/google/datastore/v1beta3/datastore.rb +115 -0
  128. data/lib/google/datastore/v1beta3/datastore_services.rb +33 -0
  129. data/lib/google/datastore/v1beta3/entity.rb +63 -0
  130. data/lib/google/datastore/v1beta3/query.rb +128 -0
  131. data/lib/google/devtools/cloudtrace/v1/trace.rb +78 -0
  132. data/lib/google/devtools/cloudtrace/v1/trace_services.rb +32 -0
  133. data/lib/google/example/library/v1/library.rb +91 -0
  134. data/lib/google/example/library/v1/library_services.rb +40 -0
  135. data/lib/google/iam/v1/iam_policy.rb +33 -0
  136. data/lib/google/iam/v1/iam_policy_services.rb +30 -0
  137. data/lib/google/iam/v1/policy.rb +25 -0
  138. data/lib/google/logging/type/http_request.rb +28 -0
  139. data/lib/google/logging/type/log_severity.rb +27 -0
  140. data/lib/google/logging/v2/log_entry.rb +44 -0
  141. data/lib/google/logging/v2/logging.rb +56 -0
  142. data/lib/google/logging/v2/logging_config.rb +59 -0
  143. data/lib/google/logging/v2/logging_config_services.rb +32 -0
  144. data/lib/google/logging/v2/logging_metrics.rb +51 -0
  145. data/lib/google/logging/v2/logging_metrics_services.rb +32 -0
  146. data/lib/google/logging/v2/logging_services.rb +31 -0
  147. data/lib/google/longrunning/operations.rb +50 -0
  148. data/lib/google/longrunning/operations_services.rb +29 -0
  149. data/lib/google/protobuf/any.rb +17 -0
  150. data/lib/google/protobuf/api.rb +31 -0
  151. data/lib/google/protobuf/descriptor.rb +0 -0
  152. data/lib/google/protobuf/duration.rb +17 -0
  153. data/lib/google/protobuf/empty.rb +15 -0
  154. data/lib/google/protobuf/field_mask.rb +16 -0
  155. data/lib/google/protobuf/source_context.rb +16 -0
  156. data/lib/google/protobuf/struct.rb +35 -0
  157. data/lib/google/protobuf/timestamp.rb +17 -0
  158. data/lib/google/protobuf/type.rb +79 -0
  159. data/lib/google/protobuf/wrappers.rb +48 -0
  160. data/lib/google/pubsub/v1/pubsub.rb +129 -0
  161. data/lib/google/pubsub/v1/pubsub_services.rb +56 -0
  162. data/lib/google/pubsub/v1beta2/pubsub.rb +126 -0
  163. data/lib/google/pubsub/v1beta2/pubsub_services.rb +56 -0
  164. data/lib/google/rpc/code.rb +32 -0
  165. data/lib/google/rpc/error_details.rb +61 -0
  166. data/lib/google/rpc/status.rb +19 -0
  167. data/lib/google/type/color.rb +20 -0
  168. data/lib/google/type/date.rb +18 -0
  169. data/lib/google/type/dayofweek.rb +23 -0
  170. data/lib/google/type/latlng.rb +17 -0
  171. data/lib/google/type/money.rb +18 -0
  172. data/lib/google/type/timeofday.rb +19 -0
  173. metadata +101 -4
  174. data/lib/gcloud/pubsub/connection.rb +0 -295
  175. data/lib/gcloud/pubsub/errors.rb +0 -93
@@ -1,4 +1,3 @@
1
- #--
2
1
  # Copyright 2015 Google Inc. All rights reserved.
3
2
  #
4
3
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,19 +12,23 @@
13
12
  # See the License for the specific language governing permissions and
14
13
  # limitations under the License.
15
14
 
15
+
16
16
  require "gcloud/dns/record/list"
17
17
 
18
18
  module Gcloud
19
19
  module Dns
20
20
  ##
21
- # = DNS Record
21
+ # # DNS Record
22
22
  #
23
- # Represents a set of DNS resource records (RRs) for a given #name and #type
24
- # in a Zone. Since it is a value object, a newly created Record instance
25
- # is transient until it is added to a Zone with Zone#update. Note that
26
- # Zone#add and the Zone#update block parameter can be used instead of
27
- # Zone#record or +Record.new+ to create new records.
23
+ # Represents a set of DNS resource records (RRs) for a given
24
+ # {Gcloud::Dns::Record#name} and {Gcloud::Dns::Record#type} in a
25
+ # {Gcloud::Dns::Zone}. Since it is a value object, a newly created Record
26
+ # instance is transient until it is added to a Zone with
27
+ # {Gcloud::Dns::Zone#update}. Note that {Gcloud::Dns::Zone#add} and the
28
+ # {Gcloud::Dns::Zone#update} block parameter can be used instead of
29
+ # {Gcloud::Dns::Zone#record} or `Record.new` to create new records.
28
30
  #
31
+ # @example
29
32
  # require "gcloud"
30
33
  #
31
34
  # gcloud = Gcloud.new
@@ -38,53 +41,57 @@ module Gcloud
38
41
  # change = zone.update record
39
42
  # zone.records.count #=> 3
40
43
  #
41
- #
42
44
  class Record
43
45
  ##
44
- # The owner of the record. For example: +example.com.+. (+String+)
46
+ # The owner of the record. For example: `example.com.`.
47
+ #
48
+ # @return [String]
49
+ #
45
50
  attr_accessor :name
46
51
 
47
52
  ##
48
- # The identifier of a {supported record type
49
- # }[https://cloud.google.com/dns/what-is-cloud-dns#supported_record_types]
50
- # . For example: +A+, +AAAA+, +CNAME+, +MX+, or +TXT+. (+String+)
53
+ # The identifier of a [supported record type
54
+ # ](https://cloud.google.com/dns/what-is-cloud-dns#supported_record_types)
55
+ # . For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
56
+ #
57
+ # @return [String]
58
+ #
51
59
  attr_accessor :type
52
60
 
53
61
  ##
54
62
  # The number of seconds that the record can be cached by resolvers.
55
- # (+Integer+)
63
+ #
64
+ # @return [Integer]
65
+ #
56
66
  attr_accessor :ttl
57
67
 
58
68
  ##
59
- # The array of resource record data, as determined by +type+ and defined
60
- # in {RFC 1035 (section 5)}[http://tools.ietf.org/html/rfc1035#section-5]
61
- # and {RFC
62
- # 1034 (section 3.6.1)}[http://tools.ietf.org/html/rfc1034#section-3.6.1].
69
+ # The array of resource record data, as determined by `type` and defined
70
+ # in [RFC 1035 (section 5)](http://tools.ietf.org/html/rfc1035#section-5)
71
+ # and [RFC
72
+ # 1034 (section 3.6.1)](http://tools.ietf.org/html/rfc1034#section-3.6.1).
63
73
  # For example: ["10 mail.example.com.", "20 mail2.example.com."].
64
- # (+Array+ of +String+)
74
+ #
75
+ # @return [Array<String>]
76
+ #
65
77
  attr_accessor :data
66
78
 
67
79
  ##
68
80
  # Creates a Record value object.
69
81
  #
70
- # === Parameters
71
- #
72
- # +name+::
73
- # The owner of the record. For example: +example.com.+. (+String+)
74
- # +type+::
75
- # The identifier of a {supported record
76
- # type}[https://cloud.google.com/dns/what-is-cloud-dns].
77
- # For example: +A+, +AAAA+, +CNAME+, +MX+, or +TXT+. (+String+)
78
- # +ttl+::
79
- # The number of seconds that the record can be cached by resolvers.
80
- # (+Integer+)
81
- # +data+::
82
- # The resource record data, as determined by +type+ and defined in {RFC
83
- # 1035 (section 5)}[http://tools.ietf.org/html/rfc1035#section-5] and
84
- # {RFC 1034
85
- # (section 3.6.1)}[http://tools.ietf.org/html/rfc1034#section-3.6.1].
82
+ # @param [String] name The owner of the record. For example:
83
+ # `example.com.`.
84
+ # @param [String] type The identifier of a [supported record
85
+ # type](https://cloud.google.com/dns/what-is-cloud-dns).
86
+ # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
87
+ # @param [Integer] ttl The number of seconds that the record can be cached
88
+ # by resolvers.
89
+ # @param [String, Array<String>] data The resource record data, as
90
+ # determined by `type` and defined in [RFC
91
+ # 1035 (section 5)](http://tools.ietf.org/html/rfc1035#section-5) and
92
+ # [RFC 1034
93
+ # (section 3.6.1)](http://tools.ietf.org/html/rfc1034#section-3.6.1).
86
94
  # For example: ["10 mail.example.com.", "20 mail2.example.com."].
87
- # (+String+ or +Array+ of +String+)
88
95
  #
89
96
  def initialize name, type, ttl, data
90
97
  fail ArgumentError, "name is required" unless name
@@ -98,9 +105,9 @@ module Gcloud
98
105
  end
99
106
 
100
107
  ##
101
- # Returns an array of strings in the zone file format, one
108
+ # @private Returns an array of strings in the zone file format, one
102
109
  # for each element in the record's data array.
103
- def to_zonefile_records #:nodoc:
110
+ def to_zonefile_records
104
111
  data.map do |rrdata|
105
112
  "#{name} #{ttl} IN #{type} #{rrdata}"
106
113
  end
@@ -109,7 +116,8 @@ module Gcloud
109
116
  ##
110
117
  # Returns a deep copy of the record. Useful for updating records, since
111
118
  # the original, unmodified record must be passed for deletion when using
112
- # Zone#update.
119
+ # {Gcloud::Dns::Zone#update}.
120
+ #
113
121
  def dup
114
122
  other = super
115
123
  other.data = data.map(&:dup)
@@ -117,32 +125,36 @@ module Gcloud
117
125
  end
118
126
 
119
127
  ##
120
- # New Record from a Google API Client object.
121
- def self.from_gapi gapi #:nodoc:
128
+ # @private New Record from a Google API Client object.
129
+ def self.from_gapi gapi
122
130
  new gapi["name"], gapi["type"], gapi["ttl"], gapi["rrdatas"]
123
131
  end
124
132
 
125
133
  ##
126
- # Convert the record object to a Google API hash.
127
- def to_gapi #:nodoc:
134
+ # @private Convert the record object to a Google API hash.
135
+ def to_gapi
128
136
  { "name" => name, "type" => type, "ttl" => ttl, "rrdatas" => data }
129
137
  end
130
138
 
131
- def hash #:nodoc:
139
+ # @private
140
+ def hash
132
141
  [name, type, ttl, data].hash
133
142
  end
134
143
 
135
- def eql? other #:nodoc:
144
+ # @private
145
+ def eql? other
136
146
  return false unless other.is_a? self.class
137
147
  name == other.name && type == other.type &&
138
148
  ttl == other.ttl && data == other.data
139
149
  end
140
150
 
141
- def == other #:nodoc:
151
+ # @private
152
+ def == other
142
153
  self.eql? other
143
154
  end
144
155
 
145
- def <=> other #:nodoc:
156
+ # @private
157
+ def <=> other
146
158
  return nil unless other.is_a? self.class
147
159
  [name, type, ttl, data] <=>
148
160
  [other.name, other.type, other.ttl, other.data]
@@ -1,4 +1,3 @@
1
- #--
2
1
  # Copyright 2015 Google Inc. All rights reserved.
3
2
  #
4
3
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,6 +12,7 @@
13
12
  # See the License for the specific language governing permissions and
14
13
  # limitations under the License.
15
14
 
15
+
16
16
  require "delegate"
17
17
 
18
18
  module Gcloud
@@ -47,11 +47,10 @@ module Gcloud
47
47
  end
48
48
 
49
49
  ##
50
- # Retrieves all records by repeatedly loading pages until #next? returns
51
- # false. Returns the list instance for method chaining.
52
- #
53
- # === Example
50
+ # Retrieves all records by repeatedly loading pages until {#next?}
51
+ # returns false. Returns the list instance for method chaining.
54
52
  #
53
+ # @example
55
54
  # require "gcloud"
56
55
  #
57
56
  # gcloud = Gcloud.new
@@ -69,8 +68,8 @@ module Gcloud
69
68
  end
70
69
 
71
70
  ##
72
- # New Records::List from a response object.
73
- def self.from_response resp, zone #:nodoc:
71
+ # @private New Records::List from a response object.
72
+ def self.from_response resp, zone
74
73
  records = new(Array(resp.data["rrsets"]).map do |gapi_object|
75
74
  Record.from_gapi gapi_object
76
75
  end)
@@ -1,4 +1,3 @@
1
- #--
2
1
  # Copyright 2015 Google Inc. All rights reserved.
3
2
  #
4
3
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,6 +12,7 @@
13
12
  # See the License for the specific language governing permissions and
14
13
  # limitations under the License.
15
14
 
15
+
16
16
  require "gcloud/dns/change"
17
17
  require "gcloud/dns/zone/transaction"
18
18
  require "gcloud/dns/zone/list"
@@ -23,13 +23,14 @@ require "time"
23
23
  module Gcloud
24
24
  module Dns
25
25
  ##
26
- # = DNS Zone
26
+ # # DNS Zone
27
27
  #
28
28
  # The managed zone is the container for DNS records for the same DNS name
29
29
  # suffix and has a set of name servers that accept and responds to queries.
30
30
  # A project can have multiple managed zones, but they must each have a
31
31
  # unique name.
32
32
  #
33
+ # @example
33
34
  # require "gcloud"
34
35
  #
35
36
  # gcloud = Gcloud.new
@@ -39,21 +40,20 @@ module Gcloud
39
40
  # puts record.name
40
41
  # end
41
42
  #
42
- # For more information, see {Managing
43
- # Zones}[https://cloud.google.com/dns/zones/].
43
+ # @see https://cloud.google.com/dns/zones/ Managing Zones
44
44
  #
45
45
  class Zone
46
46
  ##
47
- # The Connection object.
48
- attr_accessor :connection #:nodoc:
47
+ # @private The Connection object.
48
+ attr_accessor :connection
49
49
 
50
50
  ##
51
- # The Google API Client object.
52
- attr_accessor :gapi #:nodoc:
51
+ # @private The Google API Client object.
52
+ attr_accessor :gapi
53
53
 
54
54
  ##
55
- # Create an empty Zone object.
56
- def initialize #:nodoc:
55
+ # @private Create an empty Zone object.
56
+ def initialize
57
57
  @connection = nil
58
58
  @gapi = {}
59
59
  end
@@ -119,19 +119,13 @@ module Gcloud
119
119
  ##
120
120
  # Permanently deletes the zone.
121
121
  #
122
- # === Parameters
123
- #
124
- # +force+::
125
- # If +true+, ensures the deletion of the zone by first deleting all
126
- # records. If +false+ and the zone contains non-essential records, the
127
- # request will fail. Default is +false+. (+Boolean+)
128
- #
129
- # === Returns
130
- #
131
- # +true+ if the zone was deleted.
122
+ # @param [Boolean] force If `true`, ensures the deletion of the zone by
123
+ # first deleting all records. If `false` and the zone contains
124
+ # non-essential records, the request will fail. Default is `false`.
132
125
  #
133
- # === Examples
126
+ # @return [Boolean] Returns `true` if the zone was deleted.
134
127
  #
128
+ # @example
135
129
  # require "gcloud"
136
130
  #
137
131
  # gcloud = Gcloud.new
@@ -139,8 +133,7 @@ module Gcloud
139
133
  # zone = dns.zone "example-com"
140
134
  # zone.delete
141
135
  #
142
- # The zone can be forcefully deleted with the +force+ option:
143
- #
136
+ # @example The zone can be forcefully deleted with the `force` option:
144
137
  # require "gcloud"
145
138
  #
146
139
  # gcloud = Gcloud.new
@@ -164,8 +157,7 @@ module Gcloud
164
157
  # Removes non-essential records from the zone. Only NS and SOA records
165
158
  # will be kept.
166
159
  #
167
- # === Examples
168
- #
160
+ # @example
169
161
  # require "gcloud"
170
162
  #
171
163
  # gcloud = Gcloud.new
@@ -182,17 +174,12 @@ module Gcloud
182
174
  ##
183
175
  # Retrieves an existing change by id.
184
176
  #
185
- # === Parameters
186
- #
187
- # +change_id+::
188
- # The id of a change. (+String+)
189
- #
190
- # === Returns
177
+ # @param [String] change_id The id of a change.
191
178
  #
192
- # Gcloud::Dns::Change or +nil+ if the change does not exist
193
- #
194
- # === Example
179
+ # @return [Gcloud::Dns::Change, nil] Returns `nil` if the change does not
180
+ # exist.
195
181
  #
182
+ # @example
196
183
  # require "gcloud"
197
184
  #
198
185
  # gcloud = Gcloud.new
@@ -218,26 +205,19 @@ module Gcloud
218
205
  ##
219
206
  # Retrieves the list of changes belonging to the zone.
220
207
  #
221
- # === Parameters
222
- #
223
- # +token+::
224
- # A previously-returned page token representing part of the larger set
225
- # of results to view. (+String+)
226
- # +max+::
227
- # Maximum number of changes to return. (+Integer+)
228
- # +order+::
229
- # Sort the changes by change sequence. (+Symbol+ or +String+)
208
+ # @param [String] token A previously-returned page token representing part
209
+ # of the larger set of results to view.
210
+ # @param [Integer] max Maximum number of changes to return.
211
+ # @param [Symbol, String] order Sort the changes by change sequence.
230
212
  #
231
213
  # Acceptable values are:
232
- # * +asc+ - Sort by ascending change sequence
233
- # * +desc+ - Sort by descending change sequence
234
214
  #
235
- # === Returns
215
+ # * `asc` - Sort by ascending change sequence
216
+ # * `desc` - Sort by descending change sequence
236
217
  #
237
- # Array of Gcloud::Dns::Change (See Gcloud::Dns::Change::List)
238
- #
239
- # === Examples
218
+ # @return [Array<Gcloud::Dns::Change>] (See {Gcloud::Dns::Change::List})
240
219
  #
220
+ # @example
241
221
  # require "gcloud"
242
222
  #
243
223
  # gcloud = Gcloud.new
@@ -248,8 +228,7 @@ module Gcloud
248
228
  # puts "#{change.id} - #{change.started_at} - #{change.status}"
249
229
  # end
250
230
  #
251
- # The changes can be sorted by change sequence:
252
- #
231
+ # @example The changes can be sorted by change sequence:
253
232
  # require "gcloud"
254
233
  #
255
234
  # gcloud = Gcloud.new
@@ -257,9 +236,7 @@ module Gcloud
257
236
  # zone = dns.zone "example-com"
258
237
  # changes = zone.changes order: :desc
259
238
  #
260
- # If you have a significant number of changes, you may need to paginate
261
- # through them: (See Gcloud::Dns::Change::List)
262
- #
239
+ # @example With pagination: (See {Gcloud::Dns::Change::List})
263
240
  # require "gcloud"
264
241
  #
265
242
  # gcloud = Gcloud.new
@@ -292,27 +269,22 @@ module Gcloud
292
269
 
293
270
  ##
294
271
  # Retrieves the list of records belonging to the zone.
272
+ # Records can be filtered by name and type. The name argument can be a
273
+ # subdomain (e.g., `www`) fragment for convenience, but notice that the
274
+ # retrieved record's domain name is always fully-qualified.
295
275
  #
296
- # === Parameters
297
- #
298
- # +name+::
299
- # Return only records with this domain or subdomain name. (+String+)
300
- # +type+::
301
- # Return only records with this {record
302
- # type}[https://cloud.google.com/dns/what-is-cloud-dns].
303
- # If present, the +name+ parameter must also be present. (+String+)
304
- # +token+::
305
- # A previously-returned page token representing part of the larger set
306
- # of results to view. (+String+)
307
- # +max+::
308
- # Maximum number of records to return. (+Integer+)
309
- #
310
- # === Returns
311
- #
312
- # Array of Gcloud::Dns::Record (See Gcloud::Dns::Record::List)
276
+ # @param [String] name Return only records with this domain or subdomain
277
+ # name.
278
+ # @param [String] type Return only records with this [record
279
+ # type](https://cloud.google.com/dns/what-is-cloud-dns). If present, the
280
+ # `name` parameter must also be present.
281
+ # @param [String] token A previously-returned page token representing part
282
+ # of the larger set of results to view.
283
+ # @param [Integer] max Maximum number of records to return.
313
284
  #
314
- # === Examples
285
+ # @return [Array<Gcloud::Dns::Record>] (See {Gcloud::Dns::Record::List})
315
286
  #
287
+ # @example
316
288
  # require "gcloud"
317
289
  #
318
290
  # gcloud = Gcloud.new
@@ -323,10 +295,7 @@ module Gcloud
323
295
  # puts record.name
324
296
  # end
325
297
  #
326
- # Records can be filtered by name and type. The name argument can be a
327
- # subdomain (e.g., +www+) fragment for convenience, but notice that the
328
- # retrieved record's domain name is always fully-qualified.
329
- #
298
+ # @example Records can be filtered by name and type:
330
299
  # require "gcloud"
331
300
  #
332
301
  # gcloud = Gcloud.new
@@ -335,9 +304,7 @@ module Gcloud
335
304
  # records = zone.records "www", "A"
336
305
  # records.first.name #=> "www.example.com."
337
306
  #
338
- # If you have a significant number of records, you may need to paginate
339
- # through them: (See Gcloud::Dns::Record::List)
340
- #
307
+ # @example With pagination: (See {Gcloud::Dns::Record::List})
341
308
  # require "gcloud"
342
309
  #
343
310
  # gcloud = Gcloud.new
@@ -352,9 +319,7 @@ module Gcloud
352
319
  # records = records.next
353
320
  # end
354
321
  #
355
- # Or, instead of paging manually, you can retrieve all of the pages in a
356
- # single call: (See Gcloud::Dns::Record::List#all)
357
- #
322
+ # @example Retrieve all pages: (See {Gcloud::Dns::Record::List#all})
358
323
  # require "gcloud"
359
324
  #
360
325
  # gcloud = Gcloud.new
@@ -379,12 +344,9 @@ module Gcloud
379
344
  ##
380
345
  # Creates a new, unsaved Record that can be added to a Zone.
381
346
  #
382
- # === Returns
383
- #
384
- # Gcloud::Dns::Record
385
- #
386
- # === Example
347
+ # @return [Gcloud::Dns::Record]
387
348
  #
349
+ # @example
388
350
  # require "gcloud"
389
351
  #
390
352
  # gcloud = Gcloud.new
@@ -399,21 +361,15 @@ module Gcloud
399
361
  alias_method :new_record, :record
400
362
 
401
363
  ##
402
- # Exports the zone to a local {DNS zone
403
- # file}[https://en.wikipedia.org/wiki/Zone_file].
404
- #
405
- # === Parameters
406
- #
407
- # +path+::
408
- # The path on the local file system to write the data to.
409
- # The path provided must be writable. (+String+)
364
+ # Exports the zone to a local [DNS zone
365
+ # file](https://en.wikipedia.org/wiki/Zone_file).
410
366
  #
411
- # === Returns
367
+ # @param [String] path The path on the local file system to write the data
368
+ # to.The path provided must be writable.
412
369
  #
413
- # +::File+ object on the local file system
414
- #
415
- # === Examples
370
+ # @return [File] An object on the local file system.
416
371
  #
372
+ # @example
417
373
  # require "gcloud"
418
374
  #
419
375
  # gcloud = Gcloud.new
@@ -429,15 +385,15 @@ module Gcloud
429
385
  end
430
386
 
431
387
  ##
432
- # Imports resource records from a {DNS zone
433
- # file}[https://en.wikipedia.org/wiki/Zone_file], adding the new records
388
+ # Imports resource records from a [DNS zone
389
+ # file](https://en.wikipedia.org/wiki/Zone_file), adding the new records
434
390
  # to the zone, without removing any existing records from the zone.
435
391
  #
436
392
  # Because the Google Cloud DNS API only accepts a single resource record
437
- # for each +name+ and +type+ combination (with multiple +data+ elements),
393
+ # for each `name` and `type` combination (with multiple `data` elements),
438
394
  # the zone file's records are merged as necessary. During this merge, the
439
- # lowest +ttl+ of the merged records is used. If none of the merged
440
- # records have a +ttl+ value, the zone file's global TTL is used for the
395
+ # lowest `ttl` of the merged records is used. If none of the merged
396
+ # records have a `ttl` value, the zone file's global TTL is used for the
441
397
  # record.
442
398
  #
443
399
  # The zone file's SOA and NS records are not imported, because the zone
@@ -445,7 +401,7 @@ module Gcloud
445
401
  # records point to Cloud DNS name servers.
446
402
  #
447
403
  # This operation automatically updates the SOA record serial number unless
448
- # prevented with the +skip_soa+ option. See #update for details.
404
+ # prevented with the `skip_soa` option. See {#update} for details.
449
405
  #
450
406
  # The Google Cloud DNS service requires that record names and data use
451
407
  # fully-qualified addresses. The @ symbol is not accepted, nor are
@@ -453,28 +409,22 @@ module Gcloud
453
409
  # such values, you may need to pre-process it in order for the import
454
410
  # operation to succeed.
455
411
  #
456
- # === Parameters
457
- #
458
- # +path_or_io+::
459
- # The path to a zone file on the filesystem, or an IO instance from
460
- # which zone file data can be read. (+String+ or +IO+)
461
- # +only+::
462
- # Include only records of this type or types. (+String+ or +Array+)
463
- # +except+::
464
- # Exclude records of this type or types. (+String+ or +Array+)
465
- # +skip_soa+::
466
- # Do not automatically update the SOA record serial number. See #update
467
- # for details. (+Boolean+)
468
- # +soa_serial+::
469
- # A value (or a lambda or Proc returning a value) for the new SOA record
470
- # serial number. See #update for details. (+Integer+, lambda, or +Proc+)
471
- #
472
- # === Returns
473
- #
474
- # A new Change adding the imported Record instances.
475
- #
476
- # === Example
477
- #
412
+ # @param [String, IO] path_or_io The path to a zone file on the
413
+ # filesystem, or an IO instance from which zone file data can be read.
414
+ # @param [String, Array<String>] only Include only records of this type or
415
+ # types.
416
+ # @param [String, Array<String>] except Exclude records of this type or
417
+ # types.
418
+ # @param [Boolean] skip_soa Do not automatically update the SOA record
419
+ # serial number. See {#update} for details.
420
+ # @param [Integer, lambda, Proc] soa_serial A value (or a lambda or Proc
421
+ # returning a value) for the new SOA record serial number. See {#update}
422
+ # for details.
423
+ #
424
+ # @return [Gcloud::Dns::Change] A new change adding the imported Record
425
+ # instances.
426
+ #
427
+ # @example
478
428
  # require "gcloud"
479
429
  #
480
430
  # gcloud = Gcloud.new
@@ -497,35 +447,31 @@ module Gcloud
497
447
  # Adds and removes Records from the zone. All changes are made in a single
498
448
  # API request.
499
449
  #
500
- # If the SOA record for the zone is not present in +additions+ or
501
- # +deletions+ (and if present in one, it should be present in the other),
502
- # it will be added to both, and its serial number will be incremented by
503
- # adding +1+. This update to the SOA record can be prevented with the
504
- # +skip_soa+ option. To provide your own value or behavior for the new
505
- # serial number, use the +soa_serial+ option.
506
- #
507
- # === Parameters
508
- #
509
- # +additions+::
510
- # The Record or array of records to add. (Record or +Array+)
511
- # +deletions+::
512
- # The Record or array of records to remove. (Record or +Array+)
513
- # +skip_soa+::
514
- # Do not automatically update the SOA record serial number. (+Boolean+)
515
- # +soa_serial+::
516
- # A value (or a lambda or Proc returning a value) for the new SOA record
517
- # serial number. (+Integer+, lambda, or +Proc+)
518
- #
519
- # === Returns
520
- #
521
- # Gcloud::Dns::Change
522
- #
523
- # === Examples
524
- #
525
450
  # The best way to add, remove, and update multiple records in a single
526
- # {transaction}[https://cloud.google.com/dns/records] is with a block. See
527
- # Zone::Transaction.
451
+ # [transaction](https://cloud.google.com/dns/records) is with a block. See
452
+ # {Zone::Transaction}.
528
453
  #
454
+ # If the SOA record for the zone is not present in `additions` or
455
+ # `deletions` (and if present in one, it should be present in the other),
456
+ # it will be added to both, and its serial number will be incremented by
457
+ # adding `1`. This update to the SOA record can be prevented with the
458
+ # `skip_soa` option. To provide your own value or behavior for the new
459
+ # serial number, use the `soa_serial` option.
460
+ #
461
+ # @param [Record, Array<Record>] additions The Record or array of records
462
+ # to add.
463
+ # @param [Record, Array<Record>] deletions The Record or array of records
464
+ # to remove.
465
+ # @param [Boolean] skip_soa Do not automatically update the SOA record
466
+ # serial number.
467
+ # @param [Integer, lambda, Proc] soa_serial A value (or a lambda or Proc
468
+ # returning a value) for the new SOA record serial number.
469
+ # @yield [tx] a block yielding a new transaction
470
+ # @yieldparam [Zone::Transaction] tx the transaction object
471
+ #
472
+ # @return [Gcloud::Dns::Change]
473
+ #
474
+ # @example Using a block:
529
475
  # require "gcloud"
530
476
  #
531
477
  # gcloud = Gcloud.new
@@ -541,8 +487,7 @@ module Gcloud
541
487
  # end
542
488
  # end
543
489
  #
544
- # Or you can provide the record objects to add and remove.
545
- #
490
+ # @example Or you can provide the record objects to add and remove:
546
491
  # require "gcloud"
547
492
  #
548
493
  # gcloud = Gcloud.new
@@ -552,9 +497,7 @@ module Gcloud
552
497
  # old_record = zone.record "example.com.", "A", 18600, ["1.2.3.4"]
553
498
  # change = zone.update [new_record], [old_record]
554
499
  #
555
- # You can provide a lambda or Proc that receives the current SOA record
556
- # serial number and returns a new serial number.
557
- #
500
+ # @example Using a lambda or Proc to update the current SOA serial number:
558
501
  # require "gcloud"
559
502
  #
560
503
  # gcloud = Gcloud.new
@@ -599,39 +542,30 @@ module Gcloud
599
542
  # and delete records in the same transaction, use #update.
600
543
  #
601
544
  # This operation automatically updates the SOA record serial number unless
602
- # prevented with the +skip_soa+ option. See #update for details.
603
- #
604
- # === Parameters
605
- #
606
- # +name+::
607
- # The owner of the record. For example: +example.com.+. (+String+)
608
- # +type+::
609
- # The identifier of a {supported record
610
- # type}[https://cloud.google.com/dns/what-is-cloud-dns].
611
- # For example: +A+, +AAAA+, +CNAME+, +MX+, or +TXT+. (+String+)
612
- # +ttl+::
613
- # The number of seconds that the record can be cached by resolvers.
614
- # (+Integer+)
615
- # +data+::
616
- # The resource record data, as determined by +type+ and defined in {RFC
617
- # 1035 (section 5)}[http://tools.ietf.org/html/rfc1035#section-5] and
618
- # {RFC 1034
619
- # (section 3.6.1)}[http://tools.ietf.org/html/rfc1034#section-3.6.1].
620
- # For example: +192.0.2.1+ or +example.com.+. (+String+ or +Array+ of
621
- # +String+)
622
- # +skip_soa+::
623
- # Do not automatically update the SOA record serial number. See #update
624
- # for details. (+Boolean+)
625
- # +soa_serial+::
626
- # A value (or a lambda or Proc returning a value) for the new SOA record
627
- # serial number. See #update for details. (+Integer+, lambda, or +Proc+)
628
- #
629
- # === Returns
630
- #
631
- # Gcloud::Dns::Change
632
- #
633
- # === Example
634
- #
545
+ # prevented with the `skip_soa` option. See {#update} for details.
546
+ #
547
+ # @param [String] name The owner of the record. For example:
548
+ # `example.com.`.
549
+ # @param [String] type The identifier of a [supported record
550
+ # type](https://cloud.google.com/dns/what-is-cloud-dns).
551
+ # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
552
+ # @param [Integer] ttl The number of seconds that the record can be cached
553
+ # by resolvers.
554
+ # @param [String, Array<String>] data The resource record data, as
555
+ # determined by `type` and defined in [RFC
556
+ # 1035 (section 5)](http://tools.ietf.org/html/rfc1035#section-5) and
557
+ # [RFC 1034
558
+ # (section 3.6.1)](http://tools.ietf.org/html/rfc1034#section-3.6.1).
559
+ # For example: `192.0.2.1` or `example.com.`.
560
+ # @param [Boolean] skip_soa Do not automatically update the SOA record
561
+ # serial number. See {#update} for details.
562
+ # @param [Integer+, lambda, Proc] soa_serial A value (or a lambda or Proc
563
+ # returning a value) for the new SOA record serial number. See {#update}
564
+ # for details.
565
+ #
566
+ # @return [Gcloud::Dns::Change]
567
+ #
568
+ # @example
635
569
  # require "gcloud"
636
570
  #
637
571
  # gcloud = Gcloud.new
@@ -650,29 +584,22 @@ module Gcloud
650
584
  # in the same transaction, use #update.
651
585
  #
652
586
  # This operation automatically updates the SOA record serial number unless
653
- # prevented with the +skip_soa+ option. See #update for details.
654
- #
655
- # === Parameters
656
- #
657
- # +name+::
658
- # The owner of the record. For example: +example.com.+. (+String+)
659
- # +type+::
660
- # The identifier of a {supported record
661
- # type}[https://cloud.google.com/dns/what-is-cloud-dns].
662
- # For example: +A+, +AAAA+, +CNAME+, +MX+, or +TXT+. (+String+)
663
- # +skip_soa+::
664
- # Do not automatically update the SOA record serial number. See #update
665
- # for details. (+Boolean+)
666
- # +soa_serial+::
667
- # A value (or a lambda or Proc returning a value) for the new SOA record
668
- # serial number. See #update for details. (+Integer+, lambda, or +Proc+)
669
- #
670
- # === Returns
671
- #
672
- # Gcloud::Dns::Change
673
- #
674
- # === Example
675
- #
587
+ # prevented with the `skip_soa` option. See {#update} for details.
588
+ #
589
+ # @param [String] name The owner of the record. For example:
590
+ # `example.com.`.
591
+ # @param [String] type The identifier of a [supported record
592
+ # type](https://cloud.google.com/dns/what-is-cloud-dns).
593
+ # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
594
+ # @param [Boolean] skip_soa Do not automatically update the SOA record
595
+ # serial number. See {#update} for details.
596
+ # @param [Integer+, lambda, Proc] soa_serial A value (or a lambda or Proc
597
+ # returning a value) for the new SOA record serial number. See {#update}
598
+ # for details.
599
+ #
600
+ # @return [Gcloud::Dns::Change]
601
+ #
602
+ # @example
676
603
  # require "gcloud"
677
604
  #
678
605
  # gcloud = Gcloud.new
@@ -686,44 +613,35 @@ module Gcloud
686
613
  end
687
614
 
688
615
  ##
689
- # Replaces existing records on the Zone. Records matching the +name+ and
690
- # +type+ are replaced. In order to update existing records, or add and
616
+ # Replaces existing records on the Zone. Records matching the `name` and
617
+ # `type` are replaced. In order to update existing records, or add and
691
618
  # delete records in the same transaction, use #update.
692
619
  #
693
620
  # This operation automatically updates the SOA record serial number unless
694
- # prevented with the +skip_soa+ option. See #update for details.
695
- #
696
- # === Parameters
697
- #
698
- # +name+::
699
- # The owner of the record. For example: +example.com.+. (+String+)
700
- # +type+::
701
- # The identifier of a {supported record
702
- # type}[https://cloud.google.com/dns/what-is-cloud-dns].
703
- # For example: +A+, +AAAA+, +CNAME+, +MX+, or +TXT+. (+String+)
704
- # +ttl+::
705
- # The number of seconds that the record can be cached by resolvers.
706
- # (+Integer+)
707
- # +data+::
708
- # The resource record data, as determined by +type+ and defined in
709
- # {RFC 1035 (section 5)}[http://tools.ietf.org/html/rfc1035#section-5]
710
- # and {RFC 1034 (section
711
- # 3.6.1)}[http://tools.ietf.org/html/rfc1034#section-3.6.1]. For
712
- # example: +192.0.2.1+ or +example.com.+. (+String+ or +Array+ of
713
- # +String+)
714
- # +skip_soa+::
715
- # Do not automatically update the SOA record serial number. See #update
716
- # for details. (+Boolean+)
717
- # +soa_serial+::
718
- # A value (or a lambda or Proc returning a value) for the new SOA record
719
- # serial number. See #update for details. (+Integer+, lambda, or +Proc+)
720
- #
721
- # === Returns
722
- #
723
- # Gcloud::Dns::Change
724
- #
725
- # === Example
726
- #
621
+ # prevented with the `skip_soa` option. See {#update} for details.
622
+ #
623
+ # @param [String] name The owner of the record. For example:
624
+ # `example.com.`.
625
+ # @param [String] type The identifier of a [supported record
626
+ # type](https://cloud.google.com/dns/what-is-cloud-dns).
627
+ # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
628
+ # @param [Integer] ttl The number of seconds that the record can be cached
629
+ # by resolvers.
630
+ # @param [String, Array<String>] data The resource record data, as
631
+ # determined by `type` and defined in
632
+ # [RFC 1035 (section 5)](http://tools.ietf.org/html/rfc1035#section-5)
633
+ # and [RFC 1034 (section
634
+ # 3.6.1)](http://tools.ietf.org/html/rfc1034#section-3.6.1). For
635
+ # example: `192.0.2.1` or `example.com.`.
636
+ # @param [Boolean] skip_soa Do not automatically update the SOA record
637
+ # serial number. See {#update} for details.
638
+ # @param [Integer+, lambda, Proc] soa_serial A value (or a lambda or Proc
639
+ # returning a value) for the new SOA record serial number. See {#update}
640
+ # for details.
641
+ #
642
+ # @return [Gcloud::Dns::Change]
643
+ #
644
+ # @example
727
645
  # require "gcloud"
728
646
  #
729
647
  # gcloud = Gcloud.new
@@ -737,38 +655,34 @@ module Gcloud
737
655
  skip_soa: skip_soa, soa_serial: soa_serial
738
656
  end
739
657
 
740
- def to_zonefile #:nodoc:
658
+ # @private
659
+ def to_zonefile
741
660
  records.all.map(&:to_zonefile_records).flatten.join("\n")
742
661
  end
743
662
 
744
663
  ##
745
- # Modifies records on the Zone. Records matching the +name+ and +type+ are
664
+ # Modifies records on the Zone. Records matching the `name` and `type` are
746
665
  # yielded to the block where they can be modified.
747
666
  #
748
667
  # This operation automatically updates the SOA record serial number unless
749
- # prevented with the +skip_soa+ option. See #update for details.
750
- #
751
- # === Parameters
752
- #
753
- # +name+::
754
- # The owner of the record. For example: +example.com.+. (+String+)
755
- # +type+::
756
- # The identifier of a {supported record
757
- # type}[https://cloud.google.com/dns/what-is-cloud-dns].
758
- # For example: +A+, +AAAA+, +CNAME+, +MX+, or +TXT+. (+String+)
759
- # +skip_soa+::
760
- # Do not automatically update the SOA record serial number. See #update
761
- # for details. (+Boolean+)
762
- # +soa_serial+::
763
- # A value (or a lambda or Proc returning a value) for the new SOA record
764
- # serial number. See #update for details. (+Integer+, lambda, or +Proc+)
765
- #
766
- # === Returns
767
- #
768
- # Gcloud::Dns::Change
769
- #
770
- # === Example
771
- #
668
+ # prevented with the `skip_soa` option. See {#update} for details.
669
+ #
670
+ # @param [String] name The owner of the record. For example:
671
+ # `example.com.`.
672
+ # @param [String] type The identifier of a [supported record
673
+ # type](https://cloud.google.com/dns/what-is-cloud-dns).
674
+ # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
675
+ # @param [Boolean] skip_soa Do not automatically update the SOA record
676
+ # serial number. See {#update} for details.
677
+ # @param [Integer+, lambda, Proc] soa_serial A value (or a lambda or Proc
678
+ # returning a value) for the new SOA record serial number. See {#update}
679
+ # for details.
680
+ # @yield [record] a block yielding each matching record
681
+ # @yieldparam [Record] record the record to be modified
682
+ #
683
+ # @return [Gcloud::Dns::Change]
684
+ #
685
+ # @example
772
686
  # require "gcloud"
773
687
  #
774
688
  # gcloud = Gcloud.new
@@ -786,23 +700,18 @@ module Gcloud
786
700
  end
787
701
 
788
702
  ##
789
- # This helper converts the given domain name or subdomain (e.g., +www+)
790
- # fragment to a {fully qualified domain name
791
- # (FQDN)}[https://en.wikipedia.org/wiki/Fully_qualified_domain_name] for
703
+ # This helper converts the given domain name or subdomain (e.g., `www`)
704
+ # fragment to a [fully qualified domain name
705
+ # (FQDN)](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) for
792
706
  # the zone's #dns. If the argument is already a FQDN, it is returned
793
707
  # unchanged.
794
708
  #
795
- # === Parameters
796
- #
797
- # +domain_name+::
798
- # The name to convert to a fully qualified domain name. (+String+)
799
- #
800
- # === Returns
801
- #
802
- # A fully qualified domain name. (+String+)
709
+ # @param [String] domain_name The name to convert to a fully qualified
710
+ # domain name.
803
711
  #
804
- # === Examples
712
+ # @return [String] A fully qualified domain name.
805
713
  #
714
+ # @example
806
715
  # require "gcloud"
807
716
  #
808
717
  # gcloud = Gcloud.new
@@ -817,8 +726,8 @@ module Gcloud
817
726
  end
818
727
 
819
728
  ##
820
- # New Zone from a Google API Client object.
821
- def self.from_gapi gapi, conn #:nodoc:
729
+ # @private New Zone from a Google API Client object.
730
+ def self.from_gapi gapi, conn
822
731
  new.tap do |f|
823
732
  f.gapi = gapi
824
733
  f.connection = conn