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.



2124
2125
2126
2127
# File 'lib/sinatra/base.rb', line 2124

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

Instance Method Details

#call(env) ⇒ Object



2137
2138
2139
# File 'lib/sinatra/base.rb', line 2137

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

#helpersObject



2133
2134
2135
# File 'lib/sinatra/base.rb', line 2133

def helpers
  @instance
end

#inspectObject



2141
2142
2143
# File 'lib/sinatra/base.rb', line 2141

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

#settingsObject



2129
2130
2131
# File 'lib/sinatra/base.rb', line 2129

def settings
  @instance.settings
end