Class: Rubycon::Server
- Inherits:
-
Object
- Object
- Rubycon::Server
- Defined in:
- lib/rubycon/server.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#rcon ⇒ Object
readonly
Returns the value of attribute rcon.
Instance Method Summary collapse
-
#initialize(name, address, port, rcon) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(name, address, port, rcon) ⇒ Server
Returns a new instance of Server.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rubycon/server.rb', line 5 def initialize(name, address, port, rcon) @name = name @address = address @port = port @rcon = rcon raise ServerError, 'ALIAS is required.' unless @name && !@name.empty? raise ServerError, 'HOSTNAME is required.' unless @address && !@address.empty? raise ServerError, 'PORT is required.' unless @port raise ServerError, 'RCON is required' unless @rcon end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
3 4 5 |
# File 'lib/rubycon/server.rb', line 3 def address @address end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rubycon/server.rb', line 3 def name @name end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
3 4 5 |
# File 'lib/rubycon/server.rb', line 3 def port @port end |
#rcon ⇒ Object (readonly)
Returns the value of attribute rcon.
3 4 5 |
# File 'lib/rubycon/server.rb', line 3 def rcon @rcon end |