Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Momento logo

Momento Ruby Client Examples

Requirements

See the project's README.

Running the examples

First, install the gem and its dependencies.

bundle

Then, set the required environment variables:

export MOMENTO_API_KEY=<YOUR_API_KEY>

And now you can run the example programs.

  • ruby ./example.rb - shows off all the basic functionality
  • ruby ./compact.rb - the same, written in a compact style
  • ruby ./file.rb - demonstrates how to cache a file

If you wish to use the version of Momento in this repository, include the lib directory when you run the examples.

ruby -I../lib example.rb