Class: Indocker::Server

Inherits:
Object
  • Object
show all
Includes:
Concerns::Inspectable
Defined in:
lib/indocker/server.rb

Direct Known Subclasses

BuildServer

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Inspectable

#inspect

Constructor Details

#initialize(name:, host:, user:, port:) ⇒ Server

Returns a new instance of Server.



6
7
8
9
10
11
# File 'lib/indocker/server.rb', line 6

def initialize(name:, host:, user:, port:)
  @name = name
  @host = host
  @user = user
  @port = port
end

Instance Attribute Details

#host ⇒ Object (readonly)

Returns the value of attribute host.



4
5
6
# File 'lib/indocker/server.rb', line 4

def host
  @host
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/indocker/server.rb', line 4

def name
  @name
end

#port ⇒ Object (readonly)

Returns the value of attribute port.



4
5
6
# File 'lib/indocker/server.rb', line 4

def port
  @port
end

#user ⇒ Object (readonly)

Returns the value of attribute user.



4
5
6
# File 'lib/indocker/server.rb', line 4

def user
  @user
end

Instance Method Details

#==(value) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/indocker/server.rb', line 13

def ==(value)
  if value.is_a?(Indocker::Server)
    @name == value.name
  else
    super
  end
end