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.



2101
2102
2103
2104
# File 'lib/sinatra/base.rb', line 2101

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

Instance Method Details

#call(env) ⇒ Object



2114
2115
2116
# File 'lib/sinatra/base.rb', line 2114

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

#helpersObject



2110
2111
2112
# File 'lib/sinatra/base.rb', line 2110

def helpers
  @instance
end

#inspectObject



2118
2119
2120
# File 'lib/sinatra/base.rb', line 2118

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

#settingsObject



2106
2107
2108
# File 'lib/sinatra/base.rb', line 2106

def settings
  @instance.settings
end