Class: TrailGuide::Adapters::Participants::Anonymous::Adapter
- Inherits:
-
Object
- Object
- TrailGuide::Adapters::Participants::Anonymous::Adapter
- Defined in:
- lib/trail_guide/adapters/participants/anonymous.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #delete(key) ⇒ Object
- #destroy! ⇒ Object
-
#initialize(context, config) ⇒ Adapter
constructor
A new instance of Adapter.
- #key?(key) ⇒ Boolean
- #keys ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(context, config) ⇒ Adapter
Returns a new instance of Adapter.
28 29 30 31 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 28 def initialize(context, config) @context = context @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
26 27 28 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 26 def config @config end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
26 27 28 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 26 def context @context end |
Instance Method Details
#[](key) ⇒ Object
33 34 35 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 33 def [](key) hash[key] end |
#[]=(key, value) ⇒ Object
37 38 39 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 37 def []=(key, value) hash[key] = value end |
#delete(key) ⇒ Object
41 42 43 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 41 def delete(key) hash.delete(key) end |
#destroy! ⇒ Object
45 46 47 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 45 def destroy! @hash = nil end |
#key?(key) ⇒ Boolean
53 54 55 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 53 def key?(key) hash.key?(key) end |
#keys ⇒ Object
49 50 51 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 49 def keys hash.keys end |
#to_h ⇒ Object
57 58 59 |
# File 'lib/trail_guide/adapters/participants/anonymous.rb', line 57 def to_h hash.to_h end |