Class: InventoryFormatter
- Inherits:
-
Object
- Object
- InventoryFormatter
- Defined in:
- lib/formatters/inventory_formatter.rb
Instance Method Summary collapse
- #example_started(notification) ⇒ Object
-
#initialize(output) ⇒ InventoryFormatter
constructor
A new instance of InventoryFormatter.
Constructor Details
#initialize(output) ⇒ InventoryFormatter
Returns a new instance of InventoryFormatter.
6 7 8 |
# File 'lib/formatters/inventory_formatter.rb', line 6 def initialize(output) @output = output end |
Instance Method Details
#example_started(notification) ⇒ Object
10 11 12 |
# File 'lib/formatters/inventory_formatter.rb', line 10 def example_started(notification) @output << "#{JSON.unparse(name: notification.example.location)}\n" end |