Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document Actual::Method#to_s

  • Loading branch information...
commit 97a81445768be54ddba71111c3328b1a091faba0 1 parent d16d932
Nikolai Weibull authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 lib/lookout/actual/method.rb
View
14 lib/lookout/actual/method.rb
@@ -17,17 +17,19 @@ def call(actual)
actual.__send__(method, *args, &block)
end
- def to_s
- '#%s%s%s' % [method,
- args.empty? ? '' : '(%s)' % Lookout::Inspect::Argument.list(*args),
- block ? '{ … }' : '']
- end
-
# @return [Expected::Lookout::Actual::Method] An expected value wrapper of
# the receiver
def to_lookout_expected
Lookout::Expected::Lookout::Actual::Method.new(self)
end
+ # @return A string of the form “#_method_(_args_){ … }”, depending on if any
+ # arguments or block has been given
+ def to_s
+ '#%s%s%s' % [method,
+ args.empty? ? '' : '(%s)' % Lookout::Inspect::Argument.list(*args),
+ block ? '{ … }' : '']
+ end
+
alias inspect to_s
end
Please sign in to comment.
Something went wrong with that request. Please try again.