Class: PDNS::CryptoKey

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

Overview

Cryptokey for a zone.

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 = {}) ⇒ CryptoKey

Creates a cryptokey object.

Parameters:

  • http (HTTP)

    An HTTP object for interaction with the PowerDNS server.

  • parent (API)

    This object’s parent.

  • id (Integer)

    Identifier of the cryptokey.

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

    Optional information about the cryptokey.



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

def initialize(http, parent, id, info = {})
  @class  = :cryptokeys
  @http   = http
  @parent = parent
  @id     = id
  @info   = info
  @url    = "#{parent.url}/#{@class}/#{id}"
end

Instance Attribute Details

#idInteger (readonly)

Returns the ID of the cryptokey.

Returns:

  • (Integer)

    the ID of the cryptokey.



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

def id
  @id
end