quickdraw/compilation_equivalence_cases/attribute_throw.rb

Lines

100%

12 of 12 covered

Branches

—

0 of 0 covered

Methods

100%

2 of 2 covered

1# frozen_string_literal: true
2
31module EquivalenceCases
41 module AttributeThrow
51 class Thrower
61 def to_h = throw(:skip)
7 end
8
91 class AttributeThrow < Phlex::HTML
101 def view_template
116 catch(:skip) { div(data: Thrower.new) }
126 catch(:skip) { div(data: Thrower.new) { "content" } }
136 catch(:skip) { img(src: "a.png", data: Thrower.new) }
146 catch(:skip) { div(id: "x", **{ data: Thrower.new }) }
156 catch(:skip) { div(class: "a", data: Thrower.new, id: "b") }
163 plain "after"
17 end
18 end
19 end
20end