Class: Insika::StaticProfileSource
- Inherits:
-
Object
- Object
- Insika::StaticProfileSource
- Includes:
- ProfileSource
- Defined in:
- lib/insika/profile_source.rb
Overview
Static source (parity): wraps the usual => AgentProfile Hash. Behavior IDENTICAL to the frozen Hash — zero regression.
Instance Method Summary collapse
- #all ⇒ Object
- #fetch(id) ⇒ Object
- #ids ⇒ Object
-
#initialize(profiles = {}) ⇒ StaticProfileSource
constructor
A new instance of StaticProfileSource.
Methods included from ProfileSource
Constructor Details
#initialize(profiles = {}) ⇒ StaticProfileSource
Returns a new instance of StaticProfileSource.
37 38 39 |
# File 'lib/insika/profile_source.rb', line 37 def initialize(profiles = {}) @profiles = profiles end |
Instance Method Details
#all ⇒ Object
42 |
# File 'lib/insika/profile_source.rb', line 42 def all = @profiles.values |
#fetch(id) ⇒ Object
41 |
# File 'lib/insika/profile_source.rb', line 41 def fetch(id) = @profiles[id] |
#ids ⇒ Object
43 |
# File 'lib/insika/profile_source.rb', line 43 def ids = @profiles.keys |