mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Change Entry to a private struct
This commit is contained in:
parent
f8fa3e706d
commit
152ad5a5bf
1 changed files with 8 additions and 2 deletions
|
@ -2,8 +2,6 @@ require "./value_wrapper"
|
||||||
|
|
||||||
module Spectator::Internals
|
module Spectator::Internals
|
||||||
struct SampleValues
|
struct SampleValues
|
||||||
private record Entry, name : String, wrapper : ValueWrapper
|
|
||||||
|
|
||||||
def self.empty
|
def self.empty
|
||||||
new({} of Symbol => Entry)
|
new({} of Symbol => Entry)
|
||||||
end
|
end
|
||||||
|
@ -25,5 +23,13 @@ module Spectator::Internals
|
||||||
def get_value(id : Symbol, value_type : T.class) : T forall T
|
def get_value(id : Symbol, value_type : T.class) : T forall T
|
||||||
get_wrapper(id).as(TypedValueWrapper(T)).value
|
get_wrapper(id).as(TypedValueWrapper(T)).value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private struct Entry
|
||||||
|
getter name : String
|
||||||
|
getter wrapper : ValueWrapper
|
||||||
|
|
||||||
|
def initialize(@name, @wrapper)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue