Class: Docker::API::Base

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(connection = nil) ⇒ Base

Create new object and sets the validation to happen automatically when method parameters include “params” or “body”.

Parameters:

Raises:



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