quickdraw/compilation_equivalence_cases/shorthand_attributes.rb
Lines
0%0 of 23 covered
Branches
—0 of 0 covered
Methods
0%0 of 7 covered
- Not run
- 3-812-1518-2024-2730-3134-37
- Never called
EquivalenceCases::ShorthandAttributes::LocalShorthand#view_templateEquivalenceCases::ShorthandAttributes::MethodShorthand#view_templateEquivalenceCases::ShorthandAttributes::MethodShorthand#titleEquivalenceCases::ShorthandAttributes::SeveralShorthands#view_templateEquivalenceCases::ShorthandAttributes::SeveralShorthands#titleEquivalenceCases::ShorthandAttributes::SeveralShorthands#countEquivalenceCases::ShorthandAttributes::SoleShorthand#view_template
| 1 | # frozen_string_literal: true | |
| 2 | ||
| 3 | 0 | module EquivalenceCases |
| 4 | 0 | module ShorthandAttributes |
| 5 | 0 | class LocalShorthand < Phlex::HTML |
| 6 | 0 | def view_template |
| 7 | 0 | title = "Tip" |
| 8 | 0 | a(href: "/x", title:) { "link" } |
| 9 | end | |
| 10 | end | |
| 11 | ||
| 12 | 0 | class MethodShorthand < Phlex::HTML |
| 13 | 0 | def view_template |
| 14 | 0 | a(href: "/x", title:) { "link" } |
| 15 | 0 | p { @calls.to_s } |
| 16 | end | |
| 17 | ||
| 18 | 0 | private def title |
| 19 | 0 | @calls = (@calls || 0) + 1 |
| 20 | 0 | "Tip" |
| 21 | end | |
| 22 | end | |
| 23 | ||
| 24 | 0 | class SeveralShorthands < Phlex::HTML |
| 25 | 0 | def view_template |
| 26 | 0 | id = "main" |
| 27 | 0 | div(id:, title:, data: { count: }) { "content" } |
| 28 | end | |
| 29 | ||
| 30 | 0 | private def title = "Tip" |
| 31 | 0 | private def count = 3 |
| 32 | end | |
| 33 | ||
| 34 | 0 | class SoleShorthand < Phlex::HTML |
| 35 | 0 | def view_template |
| 36 | 0 | title = "Tip" |
| 37 | 0 | span(title:) |
| 38 | end | |
| 39 | end | |
| 40 | end | |
| 41 | end |