lib/pry-moves/formatter.rb in pry-moves-1.0.1 vs lib/pry-moves/formatter.rb in pry-moves-1.0.2

- old
+ new

@@ -4,10 +4,11 @@ def initialize colorize = true @colorize = colorize end + MAX_PARAMS = 5 def method_signature(binding) meth = binding.eval('__method__') meth_obj = meth ? Pry::Method.from_binding(binding) : nil if !meth_obj "" @@ -28,9 +29,12 @@ when :rest then "*#{name}" when :block then "&#{name}" else '?' end show_value ? "#{name} #{value}" : name + end + if args.count > MAX_PARAMS + args = args.first(MAX_PARAMS) + ["(#{args.count - MAX_PARAMS} more params)…"] end "#{meth_obj.name}(#{args.join(', ')})" end end \ No newline at end of file