mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Actually show type of values
This commit is contained in:
parent
acfed24e6c
commit
7b10330904
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
# Retrieves a value from the `NamedTuple` returned by `Spectator::Matchers::MatchData#values`.
|
||||
def match_data_value(match_data, key)
|
||||
puts typeof(match_data)
|
||||
puts typeof(match_data.values)
|
||||
match_data.values.fetch(key) { raise "#{key} is missing" }
|
||||
end
|
||||
|
||||
|
@ -8,7 +8,7 @@ end
|
|||
# from a `Spectator::Matchers::PrefixedValue`
|
||||
# in a `NamedTuple` returned by `Spectator::Matchers::MatchData#values`.
|
||||
def match_data_prefix(match_data, key)
|
||||
puts typeof(match_data)
|
||||
puts typeof(match_data.values)
|
||||
prefix = match_data.values.fetch(key) { raise "#{key} is missing" }
|
||||
if prefix.responds_to?(:value)
|
||||
{to_s: prefix.to_s, value: prefix.value}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue