Class: Giblish::LoadAdocSrcFromFile
- Inherits:
-
Object
- Object
- Giblish::LoadAdocSrcFromFile
- Defined in:
- lib/giblish/search/textsearcher.rb
Overview
reads all lines in the given file at instantiation and washes the text from some adoc formatting sequences.
Instance Attribute Summary collapse
-
#src_lines ⇒ Object
readonly
Returns the value of attribute src_lines.
Instance Method Summary collapse
-
#initialize(filepath) ⇒ LoadAdocSrcFromFile
constructor
A new instance of LoadAdocSrcFromFile.
Constructor Details
#initialize(filepath) ⇒ LoadAdocSrcFromFile
Returns a new instance of LoadAdocSrcFromFile.
12 13 14 15 16 17 |
# File 'lib/giblish/search/textsearcher.rb', line 12 def initialize(filepath) @src_lines = [] File.readlines(filepath.to_s, chomp: true, encoding: "UTF-8").each do |line| @src_lines << wash_line(line) end end |
Instance Attribute Details
#src_lines ⇒ Object (readonly)
Returns the value of attribute src_lines.
10 11 12 |
# File 'lib/giblish/search/textsearcher.rb', line 10 def src_lines @src_lines end |