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.


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

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

Instance Method Details

#call(env) ⇒ Object


2001
2002
2003
# File 'lib/sinatra/base.rb', line 2001

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

#helpersObject


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

def helpers
  @instance
end

#inspectObject


2005
2006
2007
# File 'lib/sinatra/base.rb', line 2005

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

#settingsObject


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

def settings
  @instance.settings
end