Class: Fog::DNS::Dreamhost::Mock
- Inherits:
-
Object
- Object
- Fog::DNS::Dreamhost::Mock
- 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
- #create_record(record, type, value, comment = "") ⇒ Object
- #data ⇒ Object
- #delete_record(name, type, value) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #request(*args) ⇒ Object
- #reset_data ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
30 31 32 |
# File 'lib/fog/dreamhost/dns.rb', line 30 def initialize(={}) @dreamhost_api_key = [:dreamhost_api_key] end |
Class Method Details
.data ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/dreamhost/dns.rb', line 20 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset ⇒ Object
26 27 28 |
# File 'lib/fog/dreamhost/dns.rb', line 26 def self.reset @data = nil end |
Instance Method Details
#create_record(record, type, value, comment = "") ⇒ Object
5 6 7 |
# File 'lib/fog/dreamhost/requests/dns/create_record.rb', line 5 def create_record(record, type, value, comment = "") Fog::Mock.not_implemented end |
#data ⇒ Object
34 35 36 |
# File 'lib/fog/dreamhost/dns.rb', line 34 def data self.class.data end |
#delete_record(name, type, value) ⇒ Object
5 6 7 |
# File 'lib/fog/dreamhost/requests/dns/delete_record.rb', line 5 def delete_record(name, type, value) raise Fog::Mock.not_implemented end |
#request(*args) ⇒ Object
5 6 7 |
# File 'lib/fog/dreamhost/requests/dns/list_records.rb', line 5 def request(*args) Fog::Mock.not_implemented end |
#reset_data ⇒ Object
38 39 40 |
# File 'lib/fog/dreamhost/dns.rb', line 38 def reset_data self.class.data.delete end |