Class: Gitlab::NullRequestStore

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/null_request_store.rb

Overview

The methods `begin!`, `clear!`, and `end!` are not defined because they should only be called directly on `RequestStore`.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object


18
19
# File 'lib/gitlab/null_request_store.rb', line 18

def [](key)
end

#[]=(key, value) ⇒ Object


25
26
27
# File 'lib/gitlab/null_request_store.rb', line 25

def []=(key, value)
  value
end

#active?Boolean

Returns:

  • (Boolean)

12
13
# File 'lib/gitlab/null_request_store.rb', line 12

def active?
end

#delete(key) {|key| ... } ⇒ Object

Yields:

  • (key)

37
38
39
# File 'lib/gitlab/null_request_store.rb', line 37

def delete(key, &block)
  yield(key) if block_given?
end

#exist?(key) ⇒ Boolean

Returns:

  • (Boolean)

29
30
31
# File 'lib/gitlab/null_request_store.rb', line 29

def exist?(key)
  false
end

#fetch(key, &block) ⇒ Object


33
34
35
# File 'lib/gitlab/null_request_store.rb', line 33

def fetch(key, &block)
  yield
end

#read(key) ⇒ Object


15
16
# File 'lib/gitlab/null_request_store.rb', line 15

def read(key)
end

#storeObject


8
9
10
# File 'lib/gitlab/null_request_store.rb', line 8

def store
  {}
end

#write(key, value) ⇒ Object


21
22
23
# File 'lib/gitlab/null_request_store.rb', line 21

def write(key, value)
  value
end