Class: TrailGuide::Adapters::Participants::Anonymous::Adapter

Inherits:
Base::Adapter
  • Object
show all
Defined in:
lib/trail_guide/adapters/participants/anonymous.rb

Instance Attribute Summary

Attributes inherited from Base::Adapter

#config, #context

Instance Method Summary collapse

Methods inherited from Base::Adapter

#initialize, #subject

Constructor Details

This class inherits a constructor from TrailGuide::Adapters::Participants::Base::Adapter

Instance Method Details

#[](key) ⇒ Object



6
7
8
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 6

def [](key)
  hash[key]
end

#[]=(key, value) ⇒ Object



10
11
12
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 10

def []=(key, value)
  hash[key] = value
end

#delete(key) ⇒ Object



14
15
16
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 14

def delete(key)
  hash.delete(key)
end

#destroy!Object



18
19
20
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 18

def destroy!
  @hash = nil
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 26

def key?(key)
  hash.key?(key)
end

#keysObject



22
23
24
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 22

def keys
  hash.keys
end

#to_hObject



30
31
32
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 30

def to_h
  hash.to_h
end