quickdraw/compilation_equivalence_cases/interpolation.rb
Lines
0%0 of 12 covered
Branches
—0 of 0 covered
Methods
0%0 of 2 covered
- Not run
- 3-71012-1620
- Never called
| 1 | # frozen_string_literal: true | |
| 2 | ||
| 3 | 0 | module EquivalenceCases |
| 4 | 0 | module Interpolation |
| 5 | 0 | class Interpolation < Phlex::HTML |
| 6 | 0 | def initialize |
| 7 | 0 | @name = "Wor<ld" |
| 8 | end | |
| 9 | ||
| 10 | 0 | def name = @name |
| 11 | ||
| 12 | 0 | def view_template |
| 13 | 0 | h1 { "Hello #{name}" } |
| 14 | 0 | h2 { "Hi #@name!" } # rubocop:disable Style/VariableInterpolation |
| 15 | 0 | h3 { "n=#{1 + 1}" } |
| 16 | 0 | p { <<~TEXT } |
| 17 | Heredoc #{name} | |
| 18 | line 2 < | |
| 19 | TEXT | |
| 20 | 0 | div { "a" "b" } # rubocop:disable Lint/ImplicitStringConcatenation |
| 21 | end | |
| 22 | end | |
| 23 | end | |
| 24 | end |