Class: Cucumber::Formatter::SimpleCSV
- Inherits:
-
Object
- Object
- Cucumber::Formatter::SimpleCSV
- Includes:
- Console, Io
- Defined in:
- lib/cucumber/formatter/simplecsv.rb
Overview
Simple CSV formatter
Instance Attribute Summary collapse
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
Instance Method Summary collapse
- #feature_name(keyword, name) ⇒ Object
-
#initialize(runtime, path_or_io, options) ⇒ SimpleCSV
constructor
A new instance of SimpleCSV.
- #scenario_name(keyword, name, file_colon_line, _source_indent) ⇒ Object
Constructor Details
#initialize(runtime, path_or_io, options) ⇒ SimpleCSV
Returns a new instance of SimpleCSV.
12 13 14 15 16 |
# File 'lib/cucumber/formatter/simplecsv.rb', line 12 def initialize(runtime, path_or_io, ) @runtime = runtime @io = ensure_io(path_or_io) @options = end |
Instance Attribute Details
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
10 11 12 |
# File 'lib/cucumber/formatter/simplecsv.rb', line 10 def runtime @runtime end |
Instance Method Details
#feature_name(keyword, name) ⇒ Object
18 19 20 21 22 |
# File 'lib/cucumber/formatter/simplecsv.rb', line 18 def feature_name(keyword, name) @feature = "#{keyword}: #{name.split("\n")[0]}" @io.puts @feature @io.flush end |
#scenario_name(keyword, name, file_colon_line, _source_indent) ⇒ Object
24 25 26 27 28 |
# File 'lib/cucumber/formatter/simplecsv.rb', line 24 def scenario_name(keyword, name, file_colon_line, _source_indent) @scenario = "#{keyword}: #{name}" @io.puts "#{@scenario},#{file_colon_line}" @io.flush end |