Class: TurnipFormatter::Renderer::Html::Index

Inherits:
Base
  • Object
show all
Defined in:
lib/turnip_formatter/renderer/html/index.rb

Constant Summary

Constants inherited from Base

Base::TEMPLATE_DIRECTORY

Instance Method Summary collapse

Methods inherited from Base

delegate, #id, #initialize, #render, resource_name, view, #view

Constructor Details

This class inherits a constructor from TurnipFormatter::Renderer::Html::Base

Instance Method Details

#result_statusObject



62
63
64
65
66
# File 'lib/turnip_formatter/renderer/html/index.rb', line 62

def result_status
  str = "#{scenarios.size} Scenario "
  str += "(#{@resource[:failed_count]} failed #{@resource[:pending_count]} pending)"
  str
end

#scenarios_htmlObject



40
41
42
43
44
45
46
47
48
# File 'lib/turnip_formatter/renderer/html/index.rb', line 40

def scenarios_html
  scenarios.map do |s|
    begin
      Scenario.new(s).render
    rescue => e
      RuntimeError.new([e, s]).render
    end
  end.join
end

#script_codesObject



32
33
34
# File 'lib/turnip_formatter/renderer/html/index.rb', line 32

def script_codes
  Html.render_javascript_codes
end


28
29
30
# File 'lib/turnip_formatter/renderer/html/index.rb', line 28

def script_links
  Html.render_javascript_links
end

#statistics_feature_htmlObject



50
51
52
# File 'lib/turnip_formatter/renderer/html/index.rb', line 50

def statistics_feature_html
  StatisticsFeature.new(scenarios).render
end

#statistics_speed_htmlObject



58
59
60
# File 'lib/turnip_formatter/renderer/html/index.rb', line 58

def statistics_speed_html
  StatisticsSpeed.new(scenarios).render
end

#statistics_tag_htmlObject



54
55
56
# File 'lib/turnip_formatter/renderer/html/index.rb', line 54

def statistics_tag_html
  StatisticsTag.new(scenarios).render
end

#style_codesObject



24
25
26
# File 'lib/turnip_formatter/renderer/html/index.rb', line 24

def style_codes
  Html.render_stylesheet_codes + Html.render_step_template_stylesheet_codes
end


20
21
22
# File 'lib/turnip_formatter/renderer/html/index.rb', line 20

def style_links
  Html.render_stylesheet_links
end

#titleObject



36
37
38
# File 'lib/turnip_formatter/renderer/html/index.rb', line 36

def title
  Html.project_name + ' report'
end

#total_timeObject



68
69
70
# File 'lib/turnip_formatter/renderer/html/index.rb', line 68

def total_time
  @resource[:total_time].to_s
end

#turnip_versionObject



72
73
74
# File 'lib/turnip_formatter/renderer/html/index.rb', line 72

def turnip_version
  Turnip::VERSION
end