Method: GEPUB::Metadata#initialize
- Defined in:
- lib/gepub/metadata.rb
#initialize(opf_version = '3.0', id_pool = Package::IDPool.new) {|_self| ... } ⇒ Metadata
Returns a new instance of Metadata.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/gepub/metadata.rb', line 63 def initialize(opf_version = '3.0',id_pool = Package::IDPool.new) @id_pool = id_pool @metalist = {} @content_nodes = {} @oldstyle_meta = [] @opf_version = opf_version @namespaces = { 'xmlns:dc' => DC_NS } @namespaces['xmlns:opf'] = OPF_NS if @opf_version.to_f < 3.0 @default_layout = 'reflowable' @default_orientation = 'auto' @default_spread = 'auto' @layout = NilContent @orientation = NilContent @spread = NilContent @ibooks_version = NilContent @ibooks_scroll_axis = NilContent @lastmodified_updated = false yield self if block_given? end |