Skip to content
Browse files

Code style.

  • Loading branch information...
1 parent 7d10b33 commit 97b012da582782c24856e694500b4a4e5bbec41f @blambeau committed
Showing with 11 additions and 14 deletions.
  1. +5 −8 lib/wlang/dialect.rb
  2. +6 −6 lib/wlang/scope.rb
View
13 lib/wlang/dialect.rb
@@ -139,14 +139,11 @@ def dialects_for(symbols)
def render(fn, scope = nil, buffer = "")
if scope.nil?
case fn
- when String
- buffer << fn
- when Proc
- fn.call(self, buffer)
- when Template
- fn.call(@scope, buffer)
- else
- raise ArgumentError, "Unable to render `#{fn}`"
+ when String then buffer << fn
+ when Proc then fn.call(self, buffer)
+ when Template then fn.call(@scope, buffer)
+ else
+ raise ArgumentError, "Unable to render `#{fn}`"
end
buffer
else
View
12 lib/wlang/scope.rb
@@ -15,12 +15,12 @@ def self.null
def self.coerce(arg, parent = nil)
return arg if Scope===arg && parent.nil?
clazz = case arg
- when Binding then BindingScope
- when Scope then ProxyScope
- when Proc then ProcScope
- else
- ObjectScope
- end
+ when Binding then BindingScope
+ when Scope then ProxyScope
+ when Proc then ProcScope
+ else
+ ObjectScope
+ end
clazz.new(arg, parent)
end

0 comments on commit 97b012d

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