mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Address Ameba errors
This commit is contained in:
parent
e8b284fc60
commit
17a3f27029
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue