Class: SAFT::V2::HTML::Analysis
- Inherits:
-
Object
- Object
- SAFT::V2::HTML::Analysis
- Defined in:
- lib/saft/v2/html.rb
Instance Attribute Summary collapse
-
#analysis ⇒ Object
readonly
Returns the value of attribute analysis.
Instance Method Summary collapse
- #html_id ⇒ Object
-
#initialize(analysis) ⇒ Analysis
constructor
A new instance of Analysis.
- #link ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(analysis) ⇒ Analysis
Returns a new instance of Analysis.
500 501 502 |
# File 'lib/saft/v2/html.rb', line 500 def initialize(analysis) @analysis = analysis end |
Instance Attribute Details
#analysis ⇒ Object (readonly)
Returns the value of attribute analysis.
504 505 506 |
# File 'lib/saft/v2/html.rb', line 504 def analysis @analysis end |
Instance Method Details
#html_id ⇒ Object
513 514 515 |
# File 'lib/saft/v2/html.rb', line 513 def html_id "analysis-#{analysis.analysis_type}-#{analysis.analysis_id}" end |
#link ⇒ Object
517 518 519 |
# File 'lib/saft/v2/html.rb', line 517 def link Tubby.new { |t| t.a(href: "##{html_id}") { yield } } end |
#title ⇒ Object
506 507 508 509 510 511 |
# File 'lib/saft/v2/html.rb', line 506 def title <<~TEXT #{analysis.analysis_type}(#{analysis.analysis_type_description}) #{analysis.analysis_id}(#{analysis.analysis_id_description}) TEXT end |