Class: PDNS::Override

Inherits:
API
  • Object
show all
Defined in:
lib/pdns_api/override.rb

Overview

Override for a server.

Instance Attribute Summary collapse

Attributes inherited from API

#class, #url

Instance Method Summary collapse

Methods inherited from API

#change, #create, #delete, #ensure_array, #get, #info

Constructor Details

#initialize(http, parent, id, info = {}) ⇒ Override

Creates a configuration option object.

Parameters:

  • http (HTTP)

    An HTTP object for interaction with the PowerDNS server.

  • parent (API)

    This object’s parent.

  • id (Integer)

    ID of the override.

  • info (Hash) (defaults to: {})

    Optional information of the override.



36
37
38
39
40
41
42
43
# File 'lib/pdns_api/override.rb', line 36

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

#idInteger (readonly)

Returns the ID of the override.

Returns:

  • (Integer)

    the ID of the override.



26
27
28
# File 'lib/pdns_api/override.rb', line 26

def id
  @id
end