class SiSU_XML_Persist::Persist

Attributes

body[RW]
book_idx[RW]
close[RW]
endnotes[RW]
head[RW]
metadata[RW]
open[RW]
sc[RW]
tail[RW]
toc[RW]

Public Class Methods

new(args=nil) click to toggle source

attr_accessor :head,:body,:tail,:open,:close,:sc @@odf={ body: [], head: [], toc: [], metadata: [], tail: [], book_idx: [], endnotes: [] }

# File lib/sisu/xml_persist.rb, line 61
def initialize(args=nil)
  @@persist=args=(args ? args : (@@persist || persist_init_hash_values))
  @head=args[:head]
  @toc=args[:toc]
  @body=args[:body]
  @tail=args[:tail]
  @open=args[:open]
  @close=args[:close]
  @sc=args[:sc]
  @endnotes=args[:endnotes]
  @book_idx=args[:book_idx]
  @metadata=args[:metadata]
end

Public Instance Methods

persist_init() click to toggle source
# File lib/sisu/xml_persist.rb, line 118
def persist_init
  @@persist=nil
  Persist.new(persist_init_hash_values)
end
persist_init_hash_values() click to toggle source
# File lib/sisu/xml_persist.rb, line 104
def persist_init_hash_values
  {
    head: [],
    toc: [],
    body: [],
    tail: [],
    open: [],
    close: [],
    sc: [],
    endnotes: [],
    book_idx: [],
    metadata: [],
  }
end