Class: God::Server
- Inherits:
-
Object
- Object
- God::Server
- Defined in:
- lib/god/server.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(host = nil, port = nil) ⇒ Server
constructor
A new instance of Server.
- #method_missing(*args, &block) ⇒ Object
Constructor Details
#initialize(host = nil, port = nil) ⇒ Server
Returns a new instance of Server.
10 11 12 13 14 |
# File 'lib/god/server.rb', line 10 def initialize(host = nil, port = nil) @host = host @port = port || 17165 start end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
16 17 18 |
# File 'lib/god/server.rb', line 16 def method_missing(*args, &block) God.send(*args, &block) end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
8 9 10 |
# File 'lib/god/server.rb', line 8 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
8 9 10 |
# File 'lib/god/server.rb', line 8 def port @port end |