Class: BuildStatusServer::Server
- Inherits:
-
Object
- Object
- BuildStatusServer::Server
- Defined in:
- lib/build_status_server/server.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
-
#udp_server ⇒ Object
readonly
Returns the value of attribute udp_server.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Server
constructor
A new instance of Server.
- #listen(run_forever = true) ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/build_status_server/server.rb', line 3 def config @config end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
3 4 5 |
# File 'lib/build_status_server/server.rb', line 3 def store @store end |
#udp_server ⇒ Object (readonly)
Returns the value of attribute udp_server.
3 4 5 |
# File 'lib/build_status_server/server.rb', line 3 def udp_server @udp_server end |
Instance Method Details
#listen(run_forever = true) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/build_status_server/server.rb', line 10 def listen(run_forever = true) setup_udp_server begin while run_forever process_loop end rescue Interrupt STDOUT.puts "Good bye." udp_server.close exit end end |