Class: Doct::Formats::OpenFormat
- Inherits:
-
Base
- Object
- Base
- Doct::Formats::OpenFormat
show all
- Defined in:
- lib/doct/formats/open_format.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#content_entries ⇒ Object
27
28
29
|
# File 'lib/doct/formats/open_format.rb', line 27
def content_entries
nil
end
|
#content_entry?(entry) ⇒ Boolean
31
32
33
|
# File 'lib/doct/formats/open_format.rb', line 31
def content_entry?(entry)
false
end
|
#placeholders ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/doct/formats/open_format.rb', line 19
def placeholders
placeholders = []
each_entry do |entry, file|
placeholders += entry_placeholders(entry, file) if _content_entry?(entry)
end
placeholders
end
|
#render(params) ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/doct/formats/open_format.rb', line 9
def render(params)
Zip::ZipOutputStream.write_buffer do |output|
each_entry do |entry, file|
file = entry_render(entry, file, params) if _content_entry?(entry)
output.put_next_entry entry
output.write file
end
end.string
end
|