quickdraw/compilation_equivalence_cases/reopened_set_constant.rb

Lines

100%

14 of 14 covered

Branches

—

0 of 0 covered

Methods

100%

4 of 4 covered

1# frozen_string_literal: true
2
31module EquivalenceCases
41 module ReopenedSetConstant
51 class ReopenedSetConstant < Phlex::HTML
61 def view_template
76 with_standard_set
86 with_custom_set
9 end
10
111 def with_standard_set
126 div(class: Set["a", "b"]) { "standard" }
13 end
14 end
15
161 module CustomSetScope
171 module Set
181 def self.[](*) = ["custom"]
19 end
20
21 # Reopened inside a scope with its own Set, which the class's name
22 # doesn't reveal.
231 class ::EquivalenceCases::ReopenedSetConstant::ReopenedSetConstant
241 def with_custom_set
256 div(class: Set["a", "b"]) { "custom" }
26 end
27 end
28 end
29 end
30end