Class: Moneta::Adapters::YAML

Inherits:
PStore show all
Defined in:
lib/moneta/adapters/yaml.rb

Overview

YAML::Store backend

Instance Attribute Summary

Attributes inherited from Moneta::Adapter

#backend

Instance Method Summary collapse

Methods inherited from PStore

#clear, #create, #delete, #each_key, #fetch_values, #increment, #key?, #load, #merge!, #slice, #store, #values_at

Methods included from NilValues

#fetch_values, #merge!, #slice

Methods inherited from Moneta::Adapter

backend, backend_block, backend_required?

Methods included from Config

#config, included

Methods included from Defaults

#[], #[]=, #close, #create, #decrement, #each_key, #features, #fetch, #fetch_values, included, #increment, #key?, #merge!, #slice, #supports?, #update, #values_at

Methods included from OptionSupport

#expires, #prefix, #raw, #with

Constructor Details

#initialize(options = {}) ⇒ Object

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :backend (YAML::Store)

    YAML store to use

  • :file (String)

    YAML file to open - required unless using :backend

  • :threadsafe (Boolean) — default: false

    Makes the YAML store thread-safe

  • Other (Object)

    options passed to ‘YAML::Store#new`



14
# File 'lib/moneta/adapters/yaml.rb', line 14

backend { |file:, threadsafe: false, **options| ::YAML::Store.new(file, threadsafe, options) }