Class: SAFT::V2::HTML::Analysis

Inherits:
Object
  • Object
show all
Defined in:
lib/saft/v2/html.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#analysisObject (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_idObject



513
514
515
# File 'lib/saft/v2/html.rb', line 513

def html_id
  "analysis-#{analysis.analysis_type}-#{analysis.analysis_id}"
end


517
518
519
# File 'lib/saft/v2/html.rb', line 517

def link
  Tubby.new { |t| t.a(href: "##{html_id}") { yield } }
end

#titleObject



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