Class: Reth::JSONRPC::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/reth/jsonrpc/filter.rb

Class Method Summary collapse

Class Method Details

.delete(id) ⇒ Object



19
20
21
# File 'lib/reth/jsonrpc/filter.rb', line 19

def delete(id)
  map.delete id
end

.find(id) ⇒ Object



15
16
17
# File 'lib/reth/jsonrpc/filter.rb', line 15

def find(id)
  map[id]
end

.include?(id) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/reth/jsonrpc/filter.rb', line 23

def include?(id)
  map.include?(id)
end

.mapObject



11
12
13
# File 'lib/reth/jsonrpc/filter.rb', line 11

def map
  @map ||= {}
end

.next_idObject



6
7
8
9
# File 'lib/reth/jsonrpc/filter.rb', line 6

def next_id
  @next_id ||= 0
  @next_id += 1
end