class RspecApiDocumentation::ApiFormatter
Public Class Methods
new(output)
click to toggle source
Calls superclass method
# File lib/rspec_api_documentation/api_formatter.rb, line 7 def initialize(output) super output.puts "Generating API Docs" end
Public Instance Methods
example_failed(example_notification)
click to toggle source
# File lib/rspec_api_documentation/api_formatter.rb, line 33 def example_failed(example_notification) output.puts " ! #{example_notification.example.description} (FAILED)" end
example_group_started(notification)
click to toggle source
Calls superclass method
# File lib/rspec_api_documentation/api_formatter.rb, line 19 def example_group_started(notification) super output.puts " #{@example_group.description}" end
example_passed(example_notification)
click to toggle source
# File lib/rspec_api_documentation/api_formatter.rb, line 25 def example_passed(example_notification) output.puts " * #{example_notification.example.description}" RspecApiDocumentation.documentations.each do |documentation| documentation.document_example(example_notification.example) end end
start(notification)
click to toggle source
Calls superclass method
# File lib/rspec_api_documentation/api_formatter.rb, line 13 def start(notification) super RspecApiDocumentation.documentations.each(&:clear_docs) end
stop(notification)
click to toggle source
# File lib/rspec_api_documentation/api_formatter.rb, line 37 def stop(notification) RspecApiDocumentation.documentations.each(&:write) end