Class: Treat::Workers::Formatters::Readers::TXT
- Inherits:
-
Object
- Object
- Treat::Workers::Formatters::Readers::TXT
- Defined in:
- lib/treat/workers/formatters/readers/txt.rb
Overview
This class simply reads a plain text file.
Class Method Summary collapse
-
.read(document, options = {}) ⇒ Object
Build an entity from a string in plain text format.
Class Method Details
.read(document, options = {}) ⇒ Object
Build an entity from a string in plain text format.
Options: none.
8 9 10 11 12 |
# File 'lib/treat/workers/formatters/readers/txt.rb', line 8 def self.read(document, = {}) document.value = File.read(document.file) document.set :format, 'txt' document end |