Module: Masks::Adapter
- Included in:
- Masks::Adapters::ActiveRecord
- Defined in:
- app/models/concerns/masks/adapter.rb
Overview
An interface that all configuration adapters should adhere to.
Instance Method Summary collapse
-
#build_actor(session, **opts) ⇒ Masks::Actor
Builds an actor from the passed options, which may contain a nickname or email.
-
#expire_actors ⇒ Object
Expires any outdated or invalid actors.
-
#find_actor(session, **opts) ⇒ Masks::Actor
Returns an actor given the passed options, which may contain a nickname and/or an email.
-
#find_actors(session, actor_ids) ⇒ Array<Masks::Actor>
Returns a list of actors matching the passed actor_ids.
-
#initialize(config) ⇒ Masks::Adapter
Creates a new adapter.
Instance Method Details
#build_actor(session, **opts) ⇒ Masks::Actor
Builds an actor from the passed options, which may contain a nickname or email. Additional attributes, like a password, will not be supplied.
49 50 51 |
# File 'app/models/concerns/masks/adapter.rb', line 49 def build_actor(session, **opts) raise NotImplementedError end |
#expire_actors ⇒ Object
Expires any outdated or invalid actors.
38 39 40 |
# File 'app/models/concerns/masks/adapter.rb', line 38 def expire_actors raise NotImplementedError end |
#find_actor(session, **opts) ⇒ Masks::Actor
Returns an actor given the passed options, which may contain a nickname and/or an email.
22 23 24 |
# File 'app/models/concerns/masks/adapter.rb', line 22 def find_actor(session, **opts) raise NotImplementedError end |
#find_actors(session, actor_ids) ⇒ Array<Masks::Actor>
Returns a list of actors matching the passed actor_ids.
31 32 33 |
# File 'app/models/concerns/masks/adapter.rb', line 31 def find_actors(session, actor_ids) raise NotImplementedError end |
#initialize(config) ⇒ Masks::Adapter
Creates a new adapter.
12 13 14 |
# File 'app/models/concerns/masks/adapter.rb', line 12 def initialize(config) @config = config end |