Class: DataSpork::BaseWriter
- Inherits:
-
Object
- Object
- DataSpork::BaseWriter
- Defined in:
- lib/data_spork/base_writer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#started ⇒ Object
Returns the value of attribute started.
Instance Method Summary collapse
- #begin_put_row ⇒ Object
- #end_put_row ⇒ Object
-
#finish ⇒ Object
Close out the document.
-
#initialize(owner) ⇒ BaseWriter
constructor
A new instance of BaseWriter.
- #put_column ⇒ Object
-
#start ⇒ Object
Start the document output - subclasses usually override :start_document instead.
- #start_document ⇒ Object
- #started? ⇒ Boolean
Constructor Details
#initialize(owner) ⇒ BaseWriter
Returns a new instance of BaseWriter.
9 10 11 12 |
# File 'lib/data_spork/base_writer.rb', line 9 def initialize(owner) @owner = owner @started = false end |
Instance Attribute Details
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
4 5 6 |
# File 'lib/data_spork/base_writer.rb', line 4 def owner @owner end |
#started ⇒ Object
Returns the value of attribute started.
3 4 5 |
# File 'lib/data_spork/base_writer.rb', line 3 def started @started end |
Instance Method Details
#begin_put_row ⇒ Object
28 29 30 |
# File 'lib/data_spork/base_writer.rb', line 28 def begin_put_row # override this end |
#end_put_row ⇒ Object
36 37 38 |
# File 'lib/data_spork/base_writer.rb', line 36 def end_put_row # override this end |
#finish ⇒ Object
Close out the document.
41 42 43 |
# File 'lib/data_spork/base_writer.rb', line 41 def finish # override this end |
#put_column ⇒ Object
32 33 34 |
# File 'lib/data_spork/base_writer.rb', line 32 def put_column # override this end |
#start ⇒ Object
Start the document output - subclasses usually override :start_document instead.
19 20 21 22 |
# File 'lib/data_spork/base_writer.rb', line 19 def start start_document self.started = true end |
#start_document ⇒ Object
24 25 26 |
# File 'lib/data_spork/base_writer.rb', line 24 def start_document # override this end |
#started? ⇒ Boolean
14 15 16 |
# File 'lib/data_spork/base_writer.rb', line 14 def started? started end |