Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactor code slightly

  • Loading branch information...
commit 7c9fb221e8be971ff1c773bc73d117db2e4e15b9 1 parent ca0e80b
@mneumann authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/wee.rb
View
11 lib/wee.rb
@@ -57,12 +57,11 @@ def Wee.run(component_class=nil, params=nil, &block)
raise ArgumentError if params[:use_continuations] and block
unless block
- block = proc do
- if params[:use_continuations]
- Wee::Session.new(component_class.instanciate, Wee::Session::ThreadSerializer.new)
- else
- Wee::Session.new(component_class.instanciate)
- end
+ block ||= if params[:use_continuations]
+ proc { Wee::Session.new(component_class.instanciate,
+ Wee::Session::ThreadSerializer.new) }
+ else
+ proc { Wee::Session.new(component_class.instanciate) }
end
end

0 comments on commit 7c9fb22

Please sign in to comment.
Something went wrong with that request. Please try again.