Class: Config

Inherits:
Object
  • Object
show all
Defined in:
config.rb

Overview

Config class is used to store variables that easily changeable In this case just the ip and port

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNilClass

Initializes the values of both ip and port

Parameters:

  • (NilClass)


19
20
21
22
23
# File 'config.rb', line 19

def initialize
  @ip = '10.0.1.4'
  # @ip = '127.0.0.1'
  @port = 6244
end

Instance Attribute Details

#:ip, :port(: ip, : port) ⇒ Object

Allows the values of ip and port to be accessed outside of the class itself



12
# File 'config.rb', line 12

attr_accessor :ip, :port

#ipObject

Allows the values of ip and port to be accessed outside of the class itself



12
13
14
# File 'config.rb', line 12

def ip
  @ip
end

#portObject

Allows the values of ip and port to be accessed outside of the class itself



12
13
14
# File 'config.rb', line 12

def port
  @port
end