class TurnipFormatter::Renderer::Html::Index

@resource [Hash]

scenarios: [Array<TurnipFormatter:Resource::Scenario::Base>]
failed_count: [Integer]
pending_count: [Integer]
total_time: [Float]

Public Instance Methods

result_status() click to toggle source
# 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_html() click to toggle source
# 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_codes() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 32
def script_codes
  Html.render_javascript_codes
end
statistics_feature_html() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 50
def statistics_feature_html
  StatisticsFeature.new(scenarios).render
end
statistics_speed_html() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 58
def statistics_speed_html
  StatisticsSpeed.new(scenarios).render
end
statistics_tag_html() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 54
def statistics_tag_html
  StatisticsTag.new(scenarios).render
end
style_codes() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 24
def style_codes
  Html.render_stylesheet_codes + Html.render_step_template_stylesheet_codes
end
title() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 36
def title
  Html.project_name + ' report'
end
total_time() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 68
def total_time
  @resource[:total_time].to_s
end
turnip_version() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 72
def turnip_version
  Turnip::VERSION
end

Private Instance Methods

scenarios() click to toggle source
# File lib/turnip_formatter/renderer/html/index.rb, line 78
def scenarios
  @resource[:scenarios]
end