Class: CorrectHorseBatteryStaple::Writer::Base
- Inherits:
-
CorrectHorseBatteryStaple::Writer
- Object
- CorrectHorseBatteryStaple::Writer
- CorrectHorseBatteryStaple::Writer::Base
- Includes:
- Common
- Defined in:
- lib/correct_horse_battery_staple/writer/base.rb
Overview
Base class for all writers
Instance Attribute Summary collapse
-
#dest ⇒ Object
Returns the value of attribute dest.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(dest, options = {}) ⇒ Base
constructor
A new instance of Base.
- #write_corpus(corpus) ⇒ Object
Methods included from Common
#array_sample, #logger, #random_in_range, #random_number, #set_sample
Methods inherited from CorrectHorseBatteryStaple::Writer
Constructor Details
#initialize(dest, options = {}) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 |
# File 'lib/correct_horse_battery_staple/writer/base.rb', line 10 def initialize(dest, = {}) self.dest = dest self. = initialize_backend_variables if respond_to?(:initialize_backend_variables) end |
Instance Attribute Details
#dest ⇒ Object
Returns the value of attribute dest.
8 9 10 |
# File 'lib/correct_horse_battery_staple/writer/base.rb', line 8 def dest @dest end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/correct_horse_battery_staple/writer/base.rb', line 8 def @options end |
Instance Method Details
#close ⇒ Object
20 21 |
# File 'lib/correct_horse_battery_staple/writer/base.rb', line 20 def close end |
#write_corpus(corpus) ⇒ Object
16 17 18 |
# File 'lib/correct_horse_battery_staple/writer/base.rb', line 16 def write_corpus(corpus) raise NotImplementedError, "#{self.class.name} is not a complete implementation" end |