Class: ThinkingSphinx::Ports::Read
- Inherits:
-
Object
- Object
- ThinkingSphinx::Ports::Read
- Defined in:
- lib/thinking_sphinx/ports/read.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path) ⇒ Read
constructor
A new instance of Read.
Constructor Details
#initialize(path) ⇒ Read
Returns a new instance of Read.
2 3 4 |
# File 'lib/thinking_sphinx/ports/read.rb', line 2 def initialize(path) @path = path end |
Instance Method Details
#call ⇒ Object
6 7 8 9 10 |
# File 'lib/thinking_sphinx/ports/read.rb', line 6 def call return {} unless File.exist?(path) YAML.load File.read(path) end |