mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Cleanup example name output
This commit is contained in:
parent
3527507639
commit
d738494fdf
2 changed files with 12 additions and 2 deletions
|
@ -82,6 +82,16 @@ module Spectator
|
|||
with context yield
|
||||
end
|
||||
|
||||
# Constructs the full name or description of the example.
|
||||
# This prepends names of groups this example is part of.
|
||||
def to_s(io)
|
||||
if name?
|
||||
super
|
||||
else
|
||||
io << "<anonymous>"
|
||||
end
|
||||
end
|
||||
|
||||
# Exposes information about the example useful for debugging.
|
||||
def inspect(io)
|
||||
# Full example name.
|
||||
|
|
|
@ -53,7 +53,7 @@ module Spectator
|
|||
|
||||
# Prefix with group's full name if the node belongs to a group.
|
||||
if (group = @group)
|
||||
io << group
|
||||
group.to_s(io)
|
||||
|
||||
# Add padding between the node names
|
||||
# only if the names don't appear to be symbolic.
|
||||
|
@ -63,7 +63,7 @@ module Spectator
|
|||
(name.starts_with?('#') || name.starts_with?('.')))
|
||||
end
|
||||
|
||||
io << name
|
||||
name.to_s(io)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue