Add to_s methods for result types

This commit is contained in:
Michael Miller 2019-03-22 20:12:36 -06:00
parent 82a4a15ba9
commit c869e4fc9a
4 changed files with 20 additions and 0 deletions

View file

@ -17,5 +17,10 @@ module Spectator
value = yield self
interface.error(value)
end
# One-word descriptor of the result.
def to_s(io)
io << "error"
end
end
end

View file

@ -27,5 +27,10 @@ module Spectator
value = yield self
interface.failure(value)
end
# One-word descriptor of the result.
def to_s(io)
io << "fail"
end
end
end

View file

@ -16,5 +16,10 @@ module Spectator
value = yield self
interface.pending(value)
end
# One-word descriptor of the result.
def to_s(io)
io << "pending"
end
end
end

View file

@ -14,5 +14,10 @@ module Spectator
value = yield self
interface.success(value)
end
# One-word descriptor of the result.
def to_s(io)
io << "success"
end
end
end