Class: Cukeregator::HtmlReader

Inherits:
Object
  • Object
show all
Includes:
Status
Defined in:
lib/cukeregator/html_reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Status

#status

Constructor Details

#initialize(html, path) ⇒ HtmlReader

Returns a new instance of HtmlReader.



10
11
12
13
14
15
16
# File 'lib/cukeregator/html_reader.rb', line 10

def initialize(html, path)
  @scripts             = parse_scripts(Nokogiri::HTML(html))
  @path                = path
  @duration            = parse_duration
  @total_scenarios, @scenario_totals = parse_totals(:scenario)
  @total_steps,     @step_totals     = parse_totals(:step)
end

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration.



8
9
10
# File 'lib/cukeregator/html_reader.rb', line 8

def duration
  @duration
end

#duration_inner_htmlObject (readonly)

Returns the value of attribute duration_inner_html.



8
9
10
# File 'lib/cukeregator/html_reader.rb', line 8

def duration_inner_html
  @duration_inner_html
end

#pathObject (readonly)

Returns the value of attribute path.



8
9
10
# File 'lib/cukeregator/html_reader.rb', line 8

def path
  @path
end

#scenario_totalsObject (readonly)

Returns the value of attribute scenario_totals.



7
8
9
# File 'lib/cukeregator/html_reader.rb', line 7

def scenario_totals
  @scenario_totals
end

#step_totalsObject (readonly)

Returns the value of attribute step_totals.



7
8
9
# File 'lib/cukeregator/html_reader.rb', line 7

def step_totals
  @step_totals
end

#total_scenariosObject (readonly)

Returns the value of attribute total_scenarios.



7
8
9
# File 'lib/cukeregator/html_reader.rb', line 7

def total_scenarios
  @total_scenarios
end

#total_stepsObject (readonly)

Returns the value of attribute total_steps.



7
8
9
# File 'lib/cukeregator/html_reader.rb', line 7

def total_steps
  @total_steps
end

#totals_inner_htmlObject (readonly)

Returns the value of attribute totals_inner_html.



7
8
9
# File 'lib/cukeregator/html_reader.rb', line 7

def totals_inner_html
  @totals_inner_html
end