Class: Docker::API::Base
- Inherits:
-
Object
- Object
- Docker::API::Base
- Defined in:
- lib/docker/api/base.rb
Overview
Base class to provide general methods, helpers and implementations accross classes.
Direct Known Subclasses
Config, Container, Exec, Image, Network, Node, Plugin, Secret, Service, Swarm, System, Task, Volume
Instance Method Summary collapse
-
#initialize(connection = nil) ⇒ Base
constructor
Create new object and sets the validation to happen automatically when method parameters include “params” or “body”.
Constructor Details
#initialize(connection = nil) ⇒ Base
Create new object and sets the validation to happen automatically when method parameters include “params” or “body”.
9 10 11 12 13 |
# File 'lib/docker/api/base.rb', line 9 def initialize connection = nil raise Docker::API::Error.new("Expected connection to be a Docker::API::Connection class") if connection != nil && !connection.is_a?(Docker::API::Connection) @connection = connection || Docker::API::Connection.new set_automated_validation end |