Class: Fog::DNS::Dreamhost::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/dreamhost/dns.rb,
lib/fog/dreamhost/requests/dns/list_records.rb,
lib/fog/dreamhost/requests/dns/create_record.rb,
lib/fog/dreamhost/requests/dns/delete_record.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



32
33
34
# File 'lib/fog/dreamhost/dns.rb', line 32

def initialize(options={})
  @dreamhost_api_key  = options[:dreamhost_api_key]
end

Class Method Details

.dataObject



22
23
24
25
26
# File 'lib/fog/dreamhost/dns.rb', line 22

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.resetObject



28
29
30
# File 'lib/fog/dreamhost/dns.rb', line 28

def self.reset
  @data = nil
end

Instance Method Details

#create_record(record, type, value, comment = "") ⇒ Object



7
8
9
# File 'lib/fog/dreamhost/requests/dns/create_record.rb', line 7

def create_record(record, type, value, comment = "")
  Fog::Mock.not_implemented
end

#dataObject



36
37
38
# File 'lib/fog/dreamhost/dns.rb', line 36

def data
  self.class.data
end

#delete_record(name, type, value) ⇒ Object



7
8
9
# File 'lib/fog/dreamhost/requests/dns/delete_record.rb', line 7

def delete_record(name, type, value)
  raise Fog::Mock.not_implemented
end

#request(*args) ⇒ Object



7
8
9
# File 'lib/fog/dreamhost/requests/dns/list_records.rb', line 7

def request(*args)
  Fog::Mock.not_implemented
end

#reset_dataObject



40
41
42
# File 'lib/fog/dreamhost/dns.rb', line 40

def reset_data
  self.class.data.delete
end