Class: Portable::Writers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/portable/writers/base.rb

Overview

Abstract base for all writers to share.

Direct Known Subclasses

Csv

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document, resolver: Objectable.resolver) ⇒ Base

Returns a new instance of Base.



17
18
19
20
21
22
# File 'lib/portable/writers/base.rb', line 17

def initialize(document, resolver: Objectable.resolver)
  @document       = Document.make(document, nullable: false)
  @sheet_renderer = Rendering::Sheet.new(@document, resolver: resolver)

  freeze
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



14
15
16
# File 'lib/portable/writers/base.rb', line 14

def document
  @document
end

#sheet_rendererObject (readonly)

Returns the value of attribute sheet_renderer.



14
15
16
# File 'lib/portable/writers/base.rb', line 14

def sheet_renderer
  @sheet_renderer
end