Class: Loader
- Inherits:
-
Object
- Object
- Loader
- Defined in:
- lib/artemo/loader.rb
Overview
Note:
This class loads file with text to analyze
Returns of all text.
Class Method Summary collapse
Class Method Details
.call(path) ⇒ Object
Note:
This method is loading text, next is removing special characters, next is splitting it to Array.
8 9 10 11 12 13 14 |
# File 'lib/artemo/loader.rb', line 8 def self.call(path) begin File.read(File.(path)).gsub!(/[^a-zA-Z ]/, '').downcase!.split(' ') rescue nil end end |