Class: TrailGuide::Adapters::Participants::Base::Adapter

Inherits:
Object
  • Object
show all
Defined in:
lib/trail_guide/adapters/participants/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, config) ⇒ Adapter

Returns a new instance of Adapter.



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

def initialize(context, config)
  @context = context
  @config = config
end

Instance Attribute Details

#configObject (readonly) Also known as: configuration

Returns the value of attribute config.



23
24
25
# File 'lib/trail_guide/adapters/participants/base.rb', line 23

def config
  @config
end

#contextObject (readonly)

Returns the value of attribute context.



23
24
25
# File 'lib/trail_guide/adapters/participants/base.rb', line 23

def context
  @context
end

Instance Method Details

#[](key) ⇒ Object

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/trail_guide/adapters/participants/base.rb', line 31

def [](key)
  raise NotImplementedError, "You must override the `[]` method in your inheriting adapter class"
end

#[]=(key, value) ⇒ Object

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/trail_guide/adapters/participants/base.rb', line 35

def []=(key, value)
  raise NotImplementedError, "You must override the `[]=` method in your inheriting adapter class"
end

#delete(key) ⇒ Object

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/trail_guide/adapters/participants/base.rb', line 39

def delete(key)
  raise NotImplementedError, "You must override the `delete` method in your inheriting adapter class"
end

#destroy!Object

Raises:

  • (NotImplementedError)


43
44
45
# File 'lib/trail_guide/adapters/participants/base.rb', line 43

def destroy!
  raise NotImplementedError, "You must override the `destroy!` method in your inheriting adapter class"
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/trail_guide/adapters/participants/base.rb', line 51

def key?(key)
  raise NotImplementedError, "You must override the `key?` method in your inheriting adapter class"
end

#keysObject

Raises:

  • (NotImplementedError)


47
48
49
# File 'lib/trail_guide/adapters/participants/base.rb', line 47

def keys
  raise NotImplementedError, "You must override the `keys` method in your inheriting adapter class"
end

#to_hObject

Raises:

  • (NotImplementedError)


55
56
57
# File 'lib/trail_guide/adapters/participants/base.rb', line 55

def to_h
  raise NotImplementedError, "You must override the `to_h` method in your inheriting adapter class"
end