quickdraw/compilation_equivalence_cases/ruby2_keywords_copy.rb
Lines
0%0 of 11 covered
Branches
—0 of 0 covered
Methods
0%0 of 4 covered
- Not run
- 3-47-912-131619-21
- Never called
| 1 | # frozen_string_literal: true | |
| 2 | ||
| 3 | 0 | module EquivalenceCases |
| 4 | 0 | module Ruby2KeywordsCopy |
| 5 | # A copy made by `define_method` shares its body with `delegate` just as | |
| 6 | # an alias does, so marking the copy marks `delegate` too. | |
| 7 | 0 | class Ruby2KeywordsCopy < Phlex::HTML |
| 8 | 0 | def view_template |
| 9 | 0 | delegate(name: "kwargs") |
| 10 | end | |
| 11 | ||
| 12 | 0 | def delegate(*args) |
| 13 | 0 | div { target(*args) } |
| 14 | end | |
| 15 | ||
| 16 | 0 | def target(*, name: "positional") = name |
| 17 | end | |
| 18 | ||
| 19 | 0 | class Copier < Ruby2KeywordsCopy |
| 20 | 0 | define_method(:forward, Ruby2KeywordsCopy.instance_method(:delegate)) |
| 21 | 0 | ruby2_keywords :forward |
| 22 | end | |
| 23 | end | |
| 24 | end |