Class: MockEtcd::Client
- Inherits:
-
Etcd::Client
- Object
- Etcd::Client
- MockEtcd::Client
- Includes:
- WebMock::API
- Defined in:
- lib/mock_etcd/client.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
Instance Method Summary collapse
- #api_execute(path, method, options = {}) ⇒ Object
-
#initialize(opts = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(opts = {}) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 |
# File 'lib/mock_etcd/client.rb', line 10 def initialize(opts = {}) @index = 0 @nodes = {} WebMock.disable_net_connect! allow_localhost: false super end |
Instance Attribute Details
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
8 9 10 |
# File 'lib/mock_etcd/client.rb', line 8 def nodes @nodes end |
Instance Method Details
#api_execute(path, method, options = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/mock_etcd/client.rb', line 19 def api_execute(path, method, = {}) stub_request! path, method, super end |