Class: ThinkingSphinx::Ports::Write

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

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Write

Returns a new instance of Write.



2
3
4
# File 'lib/thinking_sphinx/ports/write.rb', line 2

def initialize(path)
  @path = path
end

Instance Method Details

#call(data) ⇒ Object



6
7
8
# File 'lib/thinking_sphinx/ports/write.rb', line 6

def call(data)
  File.write path, YAML.dump(data)
end