diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-26 23:42:56 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-26 23:42:56 -0400 |
commit | 9dd899559e4533c61089c3f9429574d2de20925e (patch) | |
tree | 4b9fda45ad70a1b8898cfa4c695dc69e51abfec8 /lib/sampling/README.md | |
parent | 506486a6a38fc73b49dd35077cfaafbdf891c664 (diff) | |
parent | f320bb3bad4f2c3445714f0b45c3a61857203d3f (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'lib/sampling/README.md')
-rw-r--r-- | lib/sampling/README.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/sampling/README.md b/lib/sampling/README.md new file mode 100644 index 0000000..28c603e --- /dev/null +++ b/lib/sampling/README.md @@ -0,0 +1,28 @@ +Files in this directory should be modules implementing the following +interface: + + - `works_with?(Game) => Boolean` + Returns whether or not this sampling method works with the + specified game. + + - `uses_remote?() => Boolean` + Return whether or not this sampling method requires remote IDs for + users. + - `set_remote_name(User, Game, String)` + Set the remote ID for a user for the specified game. It is safe to + assume that this sampling method `works_with?` that game. + - `get_remote_name(Object)` + When given an object from `RemoteUsername#value`, give back a + human-readable/editable name to display. + + - `sampling_start(Match)` + Fetch the statistics for a match. + - `sampling_done?(Match) => Boolean` + Returns whether or not statistics have been completely collected + yet. + + - `render_user_interaction(Match, User) => String` + Returns HTML to render on a page. + - `handle_user_interaction(Match, User, Hash params)` + Handles params from the form generated by + `#user_interaction_render`. |