Class: NabaztagHackKit::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- NabaztagHackKit::Server
- Defined in:
- lib/nabaztag_hack_kit/server.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Server
constructor
set :public_folder, File.dirname(__FILE__) + ‘../public’.
Constructor Details
#initialize(opts = {}) ⇒ Server
set :public_folder, File.dirname(__FILE__) + ‘../public’
13 14 15 16 17 18 19 |
# File 'lib/nabaztag_hack_kit/server.rb', line 13 def initialize(opts = {}) super @base_file = opts.fetch(:base_file, __FILE__) @bytecode_file = opts.fetch(:bytecode_file, public_file('bytecode.bin')).to_s abort("Couldn't find Bytecode file. Pls compile first") unless File.exist?(@bytecode_file) puts "Serving Bytecode from #{@bytecode_file}" end |