Class: SCV::Server
- Inherits:
-
Object
- Object
- SCV::Server
- Defined in:
- lib/scv/server.rb
Overview
This is only intended to be a very basic web server that serves files from the ‘.scv` directory and also allows uploading files there.
Wihout! Any! Authentication!
You do understand what this means, right?
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(repository_path, port: 4242) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(repository_path, port: 4242) ⇒ Server
Returns a new instance of Server.
17 18 19 20 |
# File 'lib/scv/server.rb', line 17 def initialize(repository_path, port: 4242) @repository_path = repository_path @port = port end |
Instance Attribute Details
#port ⇒ Object (readonly)
Returns the value of attribute port.
15 16 17 |
# File 'lib/scv/server.rb', line 15 def port @port end |
Instance Method Details
#start ⇒ Object
22 23 24 |
# File 'lib/scv/server.rb', line 22 def start Rack::Handler::WEBrick.run method(:request_handler), {Port: @port} end |