Learn R Programming

vcr (version 1.6.0)

Serializers: Cassette serializers

Description

Keeps track of the cassette serializers in a hash-like object

Usage

serializer_fetch(x = "yaml", name)

Arguments

Public fields

serializers

(list) list of serializer names

name

(character) Name of a serializer. "yaml" (default) or "json"

Methods


Method new()

Create a new Serializers object

Usage

Serializers$new(serializers = list(), name = "yaml")

Arguments

serializers

(list) list of serializer names

name

(character) Name of a serializer. "yaml" (default) or "json"

Returns

A new Serializers object


Method clone()

The objects of this class are cloneable with this method.

Usage

Serializers$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Private Methods

serialize_get()

Gets a named serializer. This is also run on Serializers$new()

Examples

Run this code
if (FALSE) {
(aa <- Serializers$new())
aa$name
aa$serializers
yaml_serializer <- aa$serializers$new()
yaml_serializer

x <- Serializers$new(name = "json")
x$serializers$new()
json_serializer <- x$serializers$new()
json_serializer
}

Run the code above in your browser using DataLab