Class: RubyAppAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-app/common_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port) ⇒ RubyAppAddress

Returns a new instance of RubyAppAddress.



5
6
7
8
# File 'lib/ruby-app/common_config.rb', line 5

def initialize(host, port)
  @host = host
  @port = port
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/ruby-app/common_config.rb', line 4

def host
  @host
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/ruby-app/common_config.rb', line 4

def port
  @port
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/ruby-app/common_config.rb', line 10

def to_s
  "#{host}:#{port}"
end