Class: ThinkingSphinx::Ports::Collection
- Inherits:
-
Object
- Object
- ThinkingSphinx::Ports::Collection
- Defined in:
- lib/thinking_sphinx/ports/collection.rb
Constant Summary collapse
- FIRST_PORT =
9320
Instance Method Summary collapse
- #call(key) ⇒ Object
-
#initialize(reader, writer) ⇒ Collection
constructor
A new instance of Collection.
Constructor Details
#initialize(reader, writer) ⇒ Collection
Returns a new instance of Collection.
4 5 6 |
# File 'lib/thinking_sphinx/ports/collection.rb', line 4 def initialize(reader, writer) @reader, @writer = reader, writer end |
Instance Method Details
#call(key) ⇒ Object
8 9 10 |
# File 'lib/thinking_sphinx/ports/collection.rb', line 8 def call(key) mappings[key] || next_port_for(key) end |