Class: Vines::Config::ServerPort
Instance Attribute Summary
Attributes inherited from Port
Instance Method Summary collapse
- #hosts(*hosts) ⇒ Object
-
#initialize(config, host = '0.0.0.0', port = 5269, &block) ⇒ ServerPort
constructor
A new instance of ServerPort.
Methods inherited from Port
Methods included from Log
Constructor Details
#initialize(config, host = '0.0.0.0', port = 5269, &block) ⇒ ServerPort
Returns a new instance of ServerPort.
61 62 63 64 |
# File 'lib/vines/config/port.rb', line 61 def initialize(config, host='0.0.0.0', port=5269, &block) @hosts, @stream = [], Vines::Stream::Server super(config, host, port, &block) end |
Instance Method Details
#hosts(*hosts) ⇒ Object
66 67 68 69 70 71 72 73 |
# File 'lib/vines/config/port.rb', line 66 def hosts(*hosts) if hosts.any? @hosts << hosts @hosts.flatten! else @hosts end end |