Class: Sinatra::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(stack, instance) ⇒ Wrapper

Returns a new instance of Wrapper.


1980
1981
1982
# File 'lib/sinatra/base.rb', line 1980

def initialize(stack, instance)
  @stack, @instance = stack, instance
end

Instance Method Details

#call(env) ⇒ Object


1992
1993
1994
# File 'lib/sinatra/base.rb', line 1992

def call(env)
  @stack.call(env)
end

#helpersObject


1988
1989
1990
# File 'lib/sinatra/base.rb', line 1988

def helpers
  @instance
end

#inspectObject


1996
1997
1998
# File 'lib/sinatra/base.rb', line 1996

def inspect
  "#<#{@instance.class} app_file=#{settings.app_file.inspect}>"
end

#settingsObject


1984
1985
1986
# File 'lib/sinatra/base.rb', line 1984

def settings
  @instance.settings
end