Skip to content

Commit

Permalink
rubocop: use guard clause
Browse files Browse the repository at this point in the history
  • Loading branch information
jbodah committed Jul 1, 2016
1 parent eff95b4 commit bd4dcf3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/spy/method_call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ class MethodCall

def initialize(replayer, name, receiver, *args)
@replayer = replayer
@name = name
@name = name
@receiver = receiver
@args = args

if block_given?
@block = proc { receiver.instance_eval &Proc.new }
end
@args = args
@block = proc { receiver.instance_eval &Proc.new } if block_given?
end

def replay
Expand Down

0 comments on commit bd4dcf3

Please sign in to comment.