mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add to_s method
This commit is contained in:
parent
477271d297
commit
1756670710
1 changed files with 14 additions and 0 deletions
|
@ -24,5 +24,19 @@ module Spectator::Mocks
|
||||||
other.opts.has_key?(key) && @opts[key] === other.opts[key]
|
other.opts.has_key?(key) && @opts[key] === other.opts[key]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_s(io)
|
||||||
|
@args.each_with_index do |arg, i|
|
||||||
|
arg.inspect(io)
|
||||||
|
io << ", " if i < @args.size - 1
|
||||||
|
end
|
||||||
|
io << ", " unless @args.empty? || @opts.empty?
|
||||||
|
@opts.each_with_index do |key, value, i|
|
||||||
|
io << key
|
||||||
|
io << ": "
|
||||||
|
value.inspect(io)
|
||||||
|
io << ", " if 1 < @opts.size - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue