fix indentation

This commit is contained in:
namusyaka 2016-09-21 00:18:03 +09:00
parent 3d7b8fd577
commit 7608f7128f
1 changed files with 6 additions and 6 deletions

View File

@ -469,8 +469,8 @@ module Sinatra
def cache_control(*values)
if values.last.kind_of?(Hash)
hash = values.pop
hash.reject! { |k,v| v == false }
hash.reject! { |k,v| values << k if v == true }
hash.reject! { |k, v| v == false }
hash.reject! { |k, v| values << k if v == true }
else
hash = {}
end
@ -807,7 +807,7 @@ module Sinatra
def render(engine, data, options = {}, locals = {}, &block)
# merge app-level options
engine_options = settings.respond_to?(engine) ? settings.send(engine) : {}
engine_options = settings.respond_to?(engine) ? settings.send(engine) : {}
options.merge!(engine_options) { |key, v1, v2| v1 }
# extract generic options
@ -1207,7 +1207,7 @@ module Sinatra
@extensions = []
if superclass.respond_to?(:templates)
@templates = Hash.new { |hash,key| superclass.templates[key] }
@templates = Hash.new { |hash, key| superclass.templates[key] }
else
@templates = {}
end
@ -1639,8 +1639,8 @@ module Sinatra
unbound_method = generate_method(method_name, &block)
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a,p| unbound_method.bind(a).call(*p) } :
proc { |a,p| unbound_method.bind(a).call }
proc { |a, p| unbound_method.bind(a).call(*p) } :
proc { |a, p| unbound_method.bind(a).call }
[ pattern, conditions, wrapper ]
end