Class: DockerSwarm::Swarm

Inherits:
Base
  • Object
show all
Defined in:
lib/docker_swarm/models/swarm.rb

Overview

Access point for Docker Swarm cluster information

Class Method Summary collapse

Methods inherited from Base

all, #as_json, #assign_attributes, #attributes, defined_attributes, find, #id, #initialize, #method_missing, #payload_for_docker, #persisted?, #reload, #respond_to_missing?, root_key, routes, #serializable_hash, where

Methods included from Concerns::Inspectable

#inspect

Constructor Details

This class inherits a constructor from DockerSwarm::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class DockerSwarm::Base

Class Method Details

.resource_nameString

Override resource name to match API endpoint

Returns:

  • (String)


9
10
11
# File 'lib/docker_swarm/models/swarm.rb', line 9

def self.resource_name
  "swarm"
end

.showHash

Returns information about the swarm

Returns:

  • (Hash)

    Raw swarm data



15
16
17
# File 'lib/docker_swarm/models/swarm.rb', line 15

def self.show
  Api.request(action: routes[:show])
end