Class: InventoryFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/formatters/inventory_formatter.rb

Instance Method Summary collapse

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