Class: GHTorrent::NoopPersister

Inherits:
BaseAdapter show all
Defined in:
lib/ghtorrent/adapters/noop_persister.rb

Overview

Persister adapter that does not store any data.

Constant Summary

Constants inherited from BaseAdapter

BaseAdapter::ENTITIES

Instance Method Summary collapse

Methods inherited from BaseAdapter

#close, #count, #del, #get_underlying_connection

Constructor Details

#initialize(settings) ⇒ NoopPersister

Returns a new instance of NoopPersister.



6
7
# File 'lib/ghtorrent/adapters/noop_persister.rb', line 6

def initialize(settings)
end

Instance Method Details

#find(entity, query = {}) ⇒ Object



15
16
17
18
19
# File 'lib/ghtorrent/adapters/noop_persister.rb', line 15

def find(entity, query = {})
  super
  #Nothing to see here
  []
end

#get_idObject



21
22
23
# File 'lib/ghtorrent/adapters/noop_persister.rb', line 21

def get_id
  0
end

#store(entity, data = {}) ⇒ Object



9
10
11
12
13
# File 'lib/ghtorrent/adapters/noop_persister.rb', line 9

def store(entity, data = {})
  super
  #Nothing to see here
  0
end