Learn R Programming

webmockr (version 0.1.0)

HashCounter: hash with counter, to store requests, and count each time it is used

Description

hash with counter, to store requests, and count each time it is used

Arguments

Details

Methods
put(key)
Register a request by it's key - key: a character string of the request, serialized from CrulAdapter or other adapter
get(key)
Get a request by key - key: a character string of the request, serialized from CrulAdapter or other adapter

Examples

Run this code
x <- HashCounter$new()
x$put("foo bar")
x$put("foo bar")
x$put("hello world")
x$put("hello world")
x$put("hello world")
x$hash

Run the code above in your browser using DataLab