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.



2068
2069
2070
2071
# File 'lib/sinatra/base.rb', line 2068

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

Instance Method Details

#call(env) ⇒ Object



2081
2082
2083
# File 'lib/sinatra/base.rb', line 2081

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

#helpersObject



2077
2078
2079
# File 'lib/sinatra/base.rb', line 2077

def helpers
  @instance
end

#inspectObject



2085
2086
2087
# File 'lib/sinatra/base.rb', line 2085

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

#settingsObject



2073
2074
2075
# File 'lib/sinatra/base.rb', line 2073

def settings
  @instance.settings
end