Class: Flotte::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/flotte/service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, image:, default_environment: {}) ⇒ Service

Returns a new instance of Service.

Parameters:

  • name (String)
  • image (String)
  • default_environment (Hash) (defaults to: {})


11
12
13
14
15
# File 'lib/flotte/service.rb', line 11

def initialize(name:, image:, default_environment: {})
  @name = name
  @image = image
  @default_environment = default_environment
end

Instance Attribute Details

#default_environmentHash (readonly)

Returns:

  • (Hash)


6
7
8
# File 'lib/flotte/service.rb', line 6

def default_environment
  @default_environment
end

#imageString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/flotte/service.rb', line 4

def image
  @image
end

#nameString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/flotte/service.rb', line 4

def name
  @name
end

Instance Method Details

#idString

Returns:

  • (String)


18
19
20
# File 'lib/flotte/service.rb', line 18

def id
  name
end