Class: ThinkingSphinx::Ports::Write
- Inherits:
-
Object
- Object
- ThinkingSphinx::Ports::Write
- Defined in:
- lib/thinking_sphinx/ports/write.rb
Instance Method Summary collapse
- #call(data) ⇒ Object
-
#initialize(path) ⇒ Write
constructor
A new instance of Write.
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 |