Address Ameba errors

This commit is contained in:
Michael Miller 2021-01-30 18:57:29 -07:00
parent e8b284fc60
commit 17a3f27029
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
2 changed files with 3 additions and 3 deletions

View file

@ -47,7 +47,7 @@ module Spectator
# This consists of the label (if one is available) and the value.
def inspect(io)
if (label = @label)
io << @label
io << label
io << ':'
io << ' '
end

View file

@ -8,8 +8,8 @@ module Spectator
# The block should return the value to store.
# Subsequent calls will return the same value and not yield.
def get(&block : -> T)
if (value = @value)
value.get
if (existing = @value)
existing.get
else
yield.tap do |value|
@value = Value.new(value)