Class Spy
Baseclass for Spy.
This class follows the pattern with from Lua classes.
Metamethods
Spy:__index (key) | Lookup of missing class members. |
Methods
Spy:create () | Create a new instance. |
Spy:setReport (obj) | Set the reference to the report. |
Spy:report () | Expose reference to report. |
Spy:setReports (obj) | Set the reference to the reports collection. |
Spy:reports () | Expose reference to reports. |
Spy:traceback (...) | Traceback function calls. |
Spy:setTodo (str) | Set the todo to a string. |
Spy:setSkip (str) | Set the skip to a string. |
Spy:carp (str) | Convenience method doCarp. |
Spy:carp (str) | Convenience method doCluck. |
Spy:carp (str) | Convenience method doCroak. |
Spy:carp (str) | Convenience method doConfess. |
Metamethods
- Spy:__index (key)
-
Lookup of missing class members.
Parameters:
- key string lookup of member
Returns:
anyRaises:
on wrong arguments
Methods
- Spy:create ()
-
Create a new instance.
Assumption is either to create a new instance from an existing class,
or from a previous instance of some kind.
Returns:
self - Spy:setReport (obj)
-
Set the reference to the report.
This keeps a reference, the object is not cloned.
Parameters:
- obj table that somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Spy:report ()
-
Expose reference to report.
Returns:
Report - Spy:setReports (obj)
-
Set the reference to the reports collection.
This keeps a reference, the object is not cloned.
Parameters:
- obj table that somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Spy:reports ()
-
Expose reference to reports.
Returns:
Reports - Spy:traceback (...)
-
Traceback function calls.
This is a reformatted version.
Parameters:
- ... vararg passed to debug.traceback
Returns:
self - Spy:setTodo (str)
-
Set the todo to a string.
Parameters:
- str string alternate free form
Returns:
selfRaises:
on wrong arguments - Spy:setSkip (str)
-
Set the skip to a string.
Parameters:
- str string alternate free form
Returns:
selfRaises:
on wrong arguments - Spy:carp (str)
-
Convenience method doCarp.
Called to investigate a possible error condition.
Make a report without exiting, add a todo, with caller's name and arguments.
Parameters:
- str message to be passed on
Returns:
Report - Spy:carp (str)
-
Convenience method doCluck.
Called to investigate a possible error condition, with a stack backtrace.
Make a report without exiting, add a todo, with caller's name and arguments, and a stack trace.
Parameters:
- str message to be passed on
Returns:
Spy - Spy:carp (str)
-
Convenience method doCroak.
Called to investigate a possible error condition.
Make a report without exiting, add a skip, with caller's name and arguments.
Parameters:
- str message to be passed on
Returns:
Report - Spy:carp (str)
-
Convenience method doConfess.
Called to investigate a possible error condition, with a stack backtrace.
Make a report without exiting, add a skip, with caller's name and arguments, and a stack trace.
Parameters:
- str message to be passed on
Returns:
Report