Class: AutoreloadServer::Client
- Inherits:
-
Object
- Object
- AutoreloadServer::Client
- Defined in:
- lib/autoreload_server/client.rb
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #run(args) ⇒ Object
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 15 16 |
# File 'lib/autoreload_server/client.rb', line 8 def initialize @opts = { watch: '**/*', ignore: [], host: '127.0.0.1', directory: './public', port: 4000 } end |
Instance Method Details
#run(args) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/autoreload_server/client.rb', line 18 def run(args) (args) start_server rescue StandardError => e puts "[autoreload-server] Error: #{e.}" puts e.backtrace exit 1 end |