mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
57183bc004
Sinatra.register: * This will extend the DSL in Sinatra::Default (and subclasses) with the modules passed. * All public methods in the extensions are added to Sinatra::Delegator when extending Sinatra::Default or it's subclasses. * Sinatra::Base.register is available to add extensions to arbitrary classes (but they don't add methods to Delegator). * You can pass a block with extensions which will get added as an anonymous block (same semantics of Sinatra::Base.helpers) Sinatra.helpers: * Will forward the modules passed to Default.helpers. * Small change in semantics: passing a block to helpers will no longer class_eval the block, but will instead turn it into an anonymous module. This pushes it into the inheritance chain "normally" and allows us to call super to reach the original method if redefined. |
||
---|---|---|
.. | ||
data | ||
views | ||
base_test.rb | ||
builder_test.rb | ||
erb_test.rb | ||
extensions_test.rb | ||
filter_test.rb | ||
haml_test.rb | ||
helper.rb | ||
helpers_test.rb | ||
mapped_error_test.rb | ||
middleware_test.rb | ||
options_test.rb | ||
reload_test.rb | ||
request_test.rb | ||
response_test.rb | ||
result_test.rb | ||
routing_test.rb | ||
sass_test.rb | ||
server_test.rb | ||
sinatra_test.rb | ||
static_test.rb | ||
templates_test.rb | ||
test_test.rb |