README.md in gh_inspector-1.0.2 vs README.md in gh_inspector-1.0.3

- old
+ new

@@ -25,10 +25,13 @@ based on your raised exception, or as a direct query yourself. ``` ruby require 'gh_inspector' inspector = GhInspector::Inspector.new "orta", "eigen" +# Either use an error: +inspector.search_exception an_error, ArtsyUI.new +# Or use a specific query: inspector.search_query "Someone set us up the bomb" ``` By default this would output: @@ -52,24 +55,34 @@ The default user interface for the inspector, its public API should be considered the protocol for other classes wanting to provide a user interface. Your custom objects will be verified at runtime that they conform to the protocol. -You can see the default implmentation at +You can see the default implementation at [lib/evidence.rb](/orta/gh-issues-inspector/tree/master/lib/evidence.rb). Both `search_query` and `search_exception` take your custom delegate as a 2nd optional parameter. ``` ruby require 'gh_inspector' inspector = GhInspector::Inspector.new "orta", "eigen" -inspector.search_query "Someone set us up the bomb", ArtsyUI.new +inspector.search_exception an_error, ArtsyUI.new ``` + +or + +``` ruby +require 'gh_inspector' +inspector = GhInspector::Inspector.new "fastlane", "fastlane" +inspector.search_query "Someone set us up the bomb", FastlaneUI.new +``` + + Protocol for custom objects: - `inspector_started_query(query, inspector)` - Called just as the investigation has begun. - - `inspector_successfully_recieved_report(report, inspector)` - Called once the inspector has recieved a report with more than one issue. - - `inspector_recieved_empty_report(report, inspector)` - Called once the report has been recieved, but when there are no issues found. + - `inspector_successfully_recieved_report(report, inspector)` - Called once the inspector has received a report with more than one issue. + - `inspector_recieved_empty_report(report, inspector)` - Called once the report has been received, but when there are no issues found. - `inspector_could_not_create_report(error, query, inspector)` - Called when there have been networking issues in creating the report. ## Development