File: wrapper.rb

package info (click to toggle)
ruby-moneta 1.6.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,776 kB
  • sloc: ruby: 13,201; sh: 178; makefile: 7
file content (80 lines) | stat: -rw-r--r-- 1,741 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module Moneta
  # Wraps the calls to the adapter
  # @api public
  class Wrapper < Proxy
    # (see Proxy#key?)
    def key?(key, options = {})
      wrap(:key?, key, options) { super }
    end

    # (see Proxy#load)
    def load(key, options = {})
      wrap(:load, key, options) { super }
    end

    # (see Proxy#store)
    def store(key, value, options = {})
      wrap(:store, key, value, options) { super }
    end

    # (see Proxy#delete)
    def delete(key, options = {})
      wrap(:delete, key, options) { super }
    end

    # (see Proxy#increment)
    def increment(key, amount = 1, options = {})
      wrap(:increment, key, amount, options) { super }
    end

    # (see Proxy#create)
    def create(key, value, options = {})
      wrap(:create, key, value, options) { super }
    end

    # (see Proxy#clear)
    def clear(options = {})
      wrap(:clear, options) { super }
    end

    # (see Proxy#close)
    def close
      wrap(:close) { super }
    end

    # (see Proxy#features)
    def features
      wrap(:features) { super }
    end

    # (see Proxy#each_key)
    def each_key(&block)
      wrap(:each_key) { super }
    end

    # (see Proxy#values_at)
    def values_at(*keys, **options)
      wrap(:values_at, keys, options) { super }
    end

    # (see Proxy#fetch_values)
    def fetch_values(*keys, **options, &defaults)
      wrap(:fetch_values, keys, options, defaults) { super }
    end

    # (see Proxy#slice)
    def slice(*keys, **options)
      wrap(:slice, keys, options) { super }
    end

    # (see Proxy#merge!)
    def merge!(pairs, options = {})
      wrap(:merge!, pairs, options) { super }
    end

    # (see Proxy#config)
    def config
      wrap(:config) { super }
    end
  end
end