Module: Coradoc
- Defined in:
- lib/coradoc.rb,
lib/coradoc/cli.rb,
lib/coradoc/util.rb,
lib/coradoc/input.rb,
lib/coradoc/oscal.rb,
lib/coradoc/output.rb,
lib/coradoc/parser.rb,
lib/coradoc/version.rb,
lib/coradoc/document.rb,
lib/coradoc/converter.rb,
lib/coradoc/generator.rb,
lib/coradoc/input/adoc.rb,
lib/coradoc/input/docx.rb,
lib/coradoc/input/html.rb,
lib/coradoc/element/tag.rb,
lib/coradoc/output/adoc.rb,
lib/coradoc/parser/base.rb,
lib/coradoc/transformer.rb,
lib/coradoc/element/base.rb,
lib/coradoc/element/list.rb,
lib/coradoc/element/term.rb,
lib/coradoc/element/audio.rb,
lib/coradoc/element/block.rb,
lib/coradoc/element/break.rb,
lib/coradoc/element/image.rb,
lib/coradoc/element/table.rb,
lib/coradoc/element/title.rb,
lib/coradoc/element/video.rb,
lib/coradoc/legacy_parser.rb,
lib/coradoc/element/author.rb,
lib/coradoc/element/header.rb,
lib/coradoc/element/inline.rb,
lib/coradoc/element/include.rb,
lib/coradoc/element/section.rb,
lib/coradoc/element/revision.rb,
lib/coradoc/element/attribute.rb,
lib/coradoc/element/list/core.rb,
lib/coradoc/element/list_item.rb,
lib/coradoc/element/paragraph.rb,
lib/coradoc/input/html/config.rb,
lib/coradoc/input/html/errors.rb,
lib/coradoc/element/admonition.rb,
lib/coradoc/element/block/core.rb,
lib/coradoc/element/block/pass.rb,
lib/coradoc/element/block/side.rb,
lib/coradoc/element/image/core.rb,
lib/coradoc/element/block/quote.rb,
lib/coradoc/element/inline/bold.rb,
lib/coradoc/element/inline/link.rb,
lib/coradoc/element/bibliography.rb,
lib/coradoc/element/comment_line.rb,
lib/coradoc/element/list/ordered.rb,
lib/coradoc/element/text_element.rb,
lib/coradoc/parser/asciidoc/base.rb,
lib/coradoc/parser/asciidoc/list.rb,
lib/coradoc/parser/asciidoc/term.rb,
lib/coradoc/element/block/example.rb,
lib/coradoc/element/block/literal.rb,
lib/coradoc/element/comment_block.rb,
lib/coradoc/element/inline/anchor.rb,
lib/coradoc/element/inline/italic.rb,
lib/coradoc/input/html/converters.rb,
lib/coradoc/parser/asciidoc/block.rb,
lib/coradoc/parser/asciidoc/table.rb,
lib/coradoc/element/attribute_list.rb,
lib/coradoc/element/list/unordered.rb,
lib/coradoc/parser/asciidoc/header.rb,
lib/coradoc/parser/asciidoc/inline.rb,
lib/coradoc/element/inline/citation.rb,
lib/coradoc/element/list/definition.rb,
lib/coradoc/parser/asciidoc/content.rb,
lib/coradoc/parser/asciidoc/section.rb,
lib/coradoc/element/block/sourcecode.rb,
lib/coradoc/element/inline/highlight.rb,
lib/coradoc/element/inline/monospace.rb,
lib/coradoc/element/inline/quotation.rb,
lib/coradoc/element/inline/subscript.rb,
lib/coradoc/parser/asciidoc/citation.rb,
lib/coradoc/element/image/block_image.rb,
lib/coradoc/input/html/html_converter.rb,
lib/coradoc/output/coradoc_tree_debug.rb,
lib/coradoc/parser/asciidoc/paragraph.rb,
lib/coradoc/element/bibliography_entry.rb,
lib/coradoc/element/image/inline_image.rb,
lib/coradoc/element/inline/superscript.rb,
lib/coradoc/parser/asciidoc/admonition.rb,
lib/coradoc/element/document_attributes.rb,
lib/coradoc/element/list_item_definition.rb,
lib/coradoc/parser/asciidoc/bibliography.rb,
lib/coradoc/element/block/reviewer_comment.rb,
lib/coradoc/element/inline/cross_reference.rb,
lib/coradoc/element/inline/hard_line_break.rb,
lib/coradoc/parser/asciidoc/attribute_list.rb,
lib/coradoc/parser/asciidoc/document_attributes.rb
Defined Under Namespace
Modules: Element, Input, Output, Parser
Classes: CLI, Converter, Document, Error, Generator, LegacyParser, Oscal, Transformer
Constant Summary
collapse
- VERSION =
"1.1.3"
- ReverseAdoc =
Coradoc::Input::HTML
Class Method Summary
collapse
Class Method Details
.a_single?(obj, klass) ⇒ Boolean
6
7
8
9
|
# File 'lib/coradoc/util.rb', line 6
def self.a_single?(obj, klass)
obj.is_a?(klass) ||
(obj.is_a?(Array) && obj.length == 1 && obj.first.is_a?(klass))
end
|
.root ⇒ Object
18
19
20
|
# File 'lib/coradoc.rb', line 18
def self.root
File.dirname(__dir__)
end
|
.root_path ⇒ Object
22
23
24
|
# File 'lib/coradoc.rb', line 22
def self.root_path
Pathname.new(Coradoc.root)
end
|
.strip_unicode(str) ⇒ Object
2
3
4
|
# File 'lib/coradoc/util.rb', line 2
def self.strip_unicode(str)
str.gsub(/\A[[:space:]]+|[[:space:]]+\z/, "")
end
|