Class: PDNS::Override
Overview
Override for a server.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
The ID of the override.
Attributes inherited from API
Instance Method Summary collapse
-
#change(rrsets) ⇒ Object
Changes override information.
-
#initialize(http, parent, id, info = {}) ⇒ Override
constructor
Creates a configuration option object.
Methods inherited from API
#create, #delete, #ensure_array, #get, #info
Constructor Details
#initialize(http, parent, id, info = {}) ⇒ Override
Creates a configuration option object.
-
http: An HTTP object for interaction with the PowerDNS server. -
parent: This object’s parent. -
id: ID of the override. -
info: Optional information of the override.
35 36 37 38 39 40 41 42 |
# File 'lib/pdns_api/override.rb', line 35 def initialize(http, parent, id, info = {}) @class = :overrides @http = http @parent = parent @id = id @info = info @url = "#{parent.url}/#{@class}/#{id}" end |
Instance Attribute Details
#id ⇒ Object (readonly)
The ID of the override.
26 27 28 |
# File 'lib/pdns_api/override.rb', line 26 def id @id end |
Instance Method Details
#change(rrsets) ⇒ Object
Changes override information.
rrset is used as changeset for the update.
48 49 50 |
# File 'lib/pdns_api/override.rb', line 48 def change(rrsets) @http.put(@url, rrsets) end |