fix a little bit whitespace
This commit is contained in:
parent
af6dad2a6c
commit
dddf48207b
|
@ -705,7 +705,7 @@ module Sinatra
|
|||
render :less, template, options, locals
|
||||
end
|
||||
|
||||
def stylus(template, options={}, locals={})
|
||||
def stylus(template, options = {}, locals = {})
|
||||
options.merge! :layout => false, :default_content_type => :css
|
||||
render :styl, template, options, locals
|
||||
end
|
||||
|
@ -1081,7 +1081,7 @@ module Sinatra
|
|||
|
||||
# Creates a Hash with indifferent access.
|
||||
def indifferent_hash
|
||||
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
|
||||
Hash.new { |hash, key| hash[key.to_s] if Symbol === key }
|
||||
end
|
||||
|
||||
# Run the block with 'throw :halt' support and apply result to the response.
|
||||
|
@ -1909,9 +1909,9 @@ module Sinatra
|
|||
# top-level. Subclassing Sinatra::Base is highly recommended for
|
||||
# modular applications.
|
||||
class Application < Base
|
||||
set :logging, Proc.new { ! test? }
|
||||
set :logging, Proc.new { !test? }
|
||||
set :method_override, true
|
||||
set :run, Proc.new { ! test? }
|
||||
set :run, Proc.new { !test? }
|
||||
set :session_secret, Proc.new { super() unless development? }
|
||||
set :app_file, nil
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ module Sinatra
|
|||
def @@eats_errors.puts(*) end
|
||||
|
||||
def initialize(app)
|
||||
@app = app
|
||||
@app = app
|
||||
end
|
||||
|
||||
def call(env)
|
||||
|
@ -51,7 +51,7 @@ module Sinatra
|
|||
|
||||
def prefers_plain_text?(env)
|
||||
!(Request.new(env).preferred_type("text/plain","text/html") == "text/html") &&
|
||||
[/curl/].index{|item| item =~ env["HTTP_USER_AGENT"]}
|
||||
[/curl/].index { |item| item =~ env["HTTP_USER_AGENT"] }
|
||||
end
|
||||
|
||||
def frame_class(frame)
|
||||
|
|
|
@ -161,7 +161,7 @@ module Sinatra
|
|||
end
|
||||
|
||||
if hash.respond_to? :to_hash
|
||||
indifferent_hash = Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
|
||||
indifferent_hash = Hash.new { |hash, key| hash[key.to_s] if Symbol === key }
|
||||
indifferent_hash.merge hash.to_hash
|
||||
else
|
||||
hash
|
||||
|
|
|
@ -179,7 +179,7 @@ module Sinatra
|
|||
private
|
||||
|
||||
def content_blocks
|
||||
@content_blocks ||= Hash.new {|h,k| h[k] = [] }
|
||||
@content_blocks ||= Hash.new { |h, k| h[k] = [] }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue