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.
--
You received this message because you are subscribed to the Google
Groups "sinatrarb" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sinatrarb/-/JaWaLD41uMUJ.
To post to this group, send email to
sina...@googlegroups.com.
To unsubscribe from this group, send email to
sinatrarb+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sinatrarb?hl=en.