mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fixes for enumerating examples
This commit is contained in:
parent
39be62c511
commit
cba0abc7f1
1 changed files with 6 additions and 4 deletions
|
@ -9,16 +9,18 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
def example_count
|
def example_count
|
||||||
super.example_count * @collection.size
|
super * @collection.size
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_examples
|
def all_examples
|
||||||
Array(Example).new(example_count).tap do |array|
|
Array(Example).new(example_count).tap do |array|
|
||||||
examples = super
|
examples = super
|
||||||
examples.each do |example|
|
@collection.each do |value|
|
||||||
@mapping[example] = value
|
examples.each do |example|
|
||||||
|
@mapping[example] = value
|
||||||
|
end
|
||||||
|
array.concat(examples)
|
||||||
end
|
end
|
||||||
array.concat(examples)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue