Hello all,
require "sinatra/reloader" if development?
class MyApp < Sinatra::Base
enable :sessions #, :logging
configure :development do
register Sinatra::Reloader
end
end
#for this, I can reload this my main app file,
but for subfile resides in sub lib dir,
#in header require
$: << File.join(File.dirname(File.expand_path(__FILE__)), 'lib')
require 'client/phone'
$phone = Phone.new
#in app
get '/phone' do
$phone.foo
#params.inspect
#Luna::Session.new
#"abc"
end
I know there's no proper for 'requiring the file',
I know I must be missing something here.
but how do I reload those files too?
Thanks.