Class: SiSU_XML_Persist::Persist

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/xml_persist.rb

Constant Summary collapse

@@persist =
nil

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = nil) ⇒ Persist

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



61
62
63
64
65
66
67
68
69
70
71
72
73
# 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

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def body
  @body
end

#book_idxObject

Returns the value of attribute book_idx.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def book_idx
  @book_idx
end

#closeObject

Returns the value of attribute close.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def close
  @close
end

#endnotesObject

Returns the value of attribute endnotes.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def endnotes
  @endnotes
end

#headObject

Returns the value of attribute head.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def head
  @head
end

#metadataObject

Returns the value of attribute metadata.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def 
  @metadata
end

#openObject

Returns the value of attribute open.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def open
  @open
end

#scObject

Returns the value of attribute sc.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def sc
  @sc
end

#tailObject

Returns the value of attribute tail.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def tail
  @tail
end

#tocObject

Returns the value of attribute toc.



58
59
60
# File 'lib/sisu/xml_persist.rb', line 58

def toc
  @toc
end

Instance Method Details

#persist_initObject



118
119
120
121
# File 'lib/sisu/xml_persist.rb', line 118

def persist_init
  @@persist=nil
  Persist.new(persist_init_hash_values)
end

#persist_init_hash_valuesObject



104
105
106
107
108
109
110
111
112
113
114
115
116
117
# 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