Class: God::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/god/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hostObject (readonly)

Returns the value of attribute host.



8
9
10
# File 'lib/god/server.rb', line 8

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



8
9
10
# File 'lib/god/server.rb', line 8

def port
  @port
end