Class: Subaru::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Subaru::Server
- Defined in:
- lib/subaru.rb
Overview
The Sinatra server
Class Method Summary collapse
Class Method Details
.run!(opts = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/subaru.rb', line 11 def self.run!(opts = {}) unless opts[:config] puts "Configuration file required. Example:\n\n" puts IO.read(File.('../config_temp.yml', __FILE__)) abort end config = YAML.load_file(opts[:config]) super(bind: opts[:address], port: opts[:port], subaru_config: config) end |