Class: AwsReporting::Server
- Inherits:
-
Object
- Object
- AwsReporting::Server
- Defined in:
- lib/aws-reporting/server.rb
Instance Method Summary collapse
-
#initialize(path, port) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(path, port) ⇒ Server
Returns a new instance of Server.
5 6 7 |
# File 'lib/aws-reporting/server.rb', line 5 def initialize(path, port) @server = WEBrick::HTTPServer.new(:DocumentRoot => path, :Port => port, :BindAddress => "0.0.0.0") end |
Instance Method Details
#start ⇒ Object
9 10 11 |
# File 'lib/aws-reporting/server.rb', line 9 def start() @server.start end |
#stop ⇒ Object
13 14 15 16 |
# File 'lib/aws-reporting/server.rb', line 13 def stop() puts 'server stopped.' @server.stop end |