Class: Spoom::Coverage::Page
- Inherits:
-
Template
show all
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/spoom/coverage/report.rb
Direct Known Subclasses
Report
Constant Summary
collapse
- TEMPLATE =
T.let("#{Spoom::SPOOM_PATH}/templates/page.erb", String)
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Template
#erb, #get_binding, #html
Constructor Details
#initialize(title:, palette:, template: TEMPLATE) ⇒ Page
Returns a new instance of Page.
53
54
55
56
57
|
# File 'lib/spoom/coverage/report.rb', line 53
def initialize(title:, palette:, template: TEMPLATE)
super(template: template)
@title = title
@palette = palette
end
|
Instance Attribute Details
#palette ⇒ Object
Returns the value of attribute palette.
50
51
52
|
# File 'lib/spoom/coverage/report.rb', line 50
def palette
@palette
end
|
#title ⇒ Object
Returns the value of attribute title.
47
48
49
|
# File 'lib/spoom/coverage/report.rb', line 47
def title
@title
end
|
Instance Method Details
#body_html ⇒ Object
75
76
77
|
# File 'lib/spoom/coverage/report.rb', line 75
def body_html
cards.map(&:html).join("\n")
end
|
#cards ⇒ Object
80
|
# File 'lib/spoom/coverage/report.rb', line 80
def cards; end
|
83
84
85
|
# File 'lib/spoom/coverage/report.rb', line 83
def
"Generated by <a href='https://github.com/Shopify/spoom'>spoom</a> on #{Time.now.utc}."
end
|
70
71
72
|
# File 'lib/spoom/coverage/report.rb', line 70
def
"<h1 class='display-3'>#{title}</h1>"
end
|
65
66
67
|
# File 'lib/spoom/coverage/report.rb', line 65
def
D3.(palette)
end
|
60
61
62
|
# File 'lib/spoom/coverage/report.rb', line 60
def
D3.
end
|