Class: Config
- Inherits:
-
Object
- Object
- Config
- 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
-
#:ip, :port(: ip, : port) ⇒ Object
Allows the values of ip and port to be accessed outside of the class itself.
-
#ip ⇒ Object
Allows the values of ip and port to be accessed outside of the class itself.
-
#port ⇒ Object
Allows the values of ip and port to be accessed outside of the class itself.
Instance Method Summary collapse
-
#initialize ⇒ NilClass
constructor
Initializes the values of both ip and port.
Constructor Details
#initialize ⇒ NilClass
Initializes the values of both ip and port
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 |
#ip ⇒ Object
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 |
#port ⇒ Object
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 |