Class: ThinkingSphinx::Ports::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/ports/collection.rb

Constant Summary collapse

FIRST_PORT =
9320

Instance Method Summary collapse

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