Access Sinatra settings from a model
问题 I have a modular Sinatra app. I'm setting some custom variables in my configure block and want to access these settings in my model. The problem is, I get a NoMethodError when I try and access my custom settings from MyModel . Standard settings still seem to work fine though. How can I make this work? # app.rb require_relative 'models/document' class App < Sinatra::Base configure do set :resource_path, '/xfiles/i_want_to_believe' end get '/' do @model = MyModel.new haml :index end end #