Method: Sinatra::Base.configure

Defined in:
lib/sinatra/base.rb

.configure(*envs) {|_self| ... } ⇒ Object

Set configuration options for Sinatra and/or the app. Allows scoping of settings for certain environments.

Yields:

  • (_self)

Yield Parameters:

  • _self (Sinatra::Base)

    the object that the method was called on



1210
1211
1212
# File 'lib/sinatra/base.rb', line 1210

def configure(*envs, &block)
  yield self if envs.empty? || envs.include?(environment.to_sym)
end