Address Ameba errors
This commit is contained in:
parent
e8b284fc60
commit
17a3f27029
|
@ -47,7 +47,7 @@ module Spectator
|
||||||
# This consists of the label (if one is available) and the value.
|
# This consists of the label (if one is available) and the value.
|
||||||
def inspect(io)
|
def inspect(io)
|
||||||
if (label = @label)
|
if (label = @label)
|
||||||
io << @label
|
io << label
|
||||||
io << ':'
|
io << ':'
|
||||||
io << ' '
|
io << ' '
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,8 +8,8 @@ module Spectator
|
||||||
# The block should return the value to store.
|
# The block should return the value to store.
|
||||||
# Subsequent calls will return the same value and not yield.
|
# Subsequent calls will return the same value and not yield.
|
||||||
def get(&block : -> T)
|
def get(&block : -> T)
|
||||||
if (value = @value)
|
if (existing = @value)
|
||||||
value.get
|
existing.get
|
||||||
else
|
else
|
||||||
yield.tap do |value|
|
yield.tap do |value|
|
||||||
@value = Value.new(value)
|
@value = Value.new(value)
|
||||||
|
|
Loading…
Reference in New Issue