Class: Biblionet::Extractors::StringBuilder
- Inherits:
-
Object
- Object
- Biblionet::Extractors::StringBuilder
- Defined in:
- lib/bookshark/extractors/search.rb
Instance Method Summary collapse
- #append(text) ⇒ Object
- #build ⇒ Object
-
#initialize ⇒ StringBuilder
constructor
A new instance of StringBuilder.
Constructor Details
#initialize ⇒ StringBuilder
Returns a new instance of StringBuilder.
98 99 100 |
# File 'lib/bookshark/extractors/search.rb', line 98 def initialize @string = [] end |
Instance Method Details
#append(text) ⇒ Object
102 103 104 |
# File 'lib/bookshark/extractors/search.rb', line 102 def append(text) @string << text end |
#build ⇒ Object
106 107 108 |
# File 'lib/bookshark/extractors/search.rb', line 106 def build @string.join.to_s end |