Class: Cucumber::HTMLFormatter::Formatter
- Inherits:
-
Object
- Object
- Cucumber::HTMLFormatter::Formatter
- Defined in:
- lib/cucumber/html_formatter/formatter.rb
Instance Attribute Summary collapse
-
#out ⇒ Object
readonly
Returns the value of attribute out.
Instance Method Summary collapse
-
#initialize(out) ⇒ Formatter
constructor
A new instance of Formatter.
- #process_messages(messages) ⇒ Object
- #write_message(message) ⇒ Object
- #write_post_message ⇒ Object
- #write_pre_message ⇒ Object
Constructor Details
#initialize(out) ⇒ Formatter
Returns a new instance of Formatter.
12 13 14 15 16 |
# File 'lib/cucumber/html_formatter/formatter.rb', line 12 def initialize(out) @out = out @pre_message_written = false @first_message = true end |
Instance Attribute Details
#out ⇒ Object (readonly)
Returns the value of attribute out.
10 11 12 |
# File 'lib/cucumber/html_formatter/formatter.rb', line 10 def out @out end |
Instance Method Details
#process_messages(messages) ⇒ Object
[View source]
18 19 20 21 22 |
# File 'lib/cucumber/html_formatter/formatter.rb', line 18 def () .each { || () } end |
#write_message(message) ⇒ Object
[View source]
24 25 26 27 28 29 |
# File 'lib/cucumber/html_formatter/formatter.rb', line 24 def () out.puts(',') unless @first_message out.print(.to_json.gsub('/', '\/')) @first_message = false end |
#write_post_message ⇒ Object
[View source]
38 39 40 |
# File 'lib/cucumber/html_formatter/formatter.rb', line 38 def out.print() end |
#write_pre_message ⇒ Object
[View source]
31 32 33 34 35 36 |
# File 'lib/cucumber/html_formatter/formatter.rb', line 31 def return if @pre_message_written out.puts() @pre_message_written = true end |