Class: Asciidoctor::ConfluencePublisher::Asciidoc
- Inherits:
-
Object
- Object
- Asciidoctor::ConfluencePublisher::Asciidoc
- Defined in:
- lib/asciidoctor/confluence_publisher/asciidoc.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #has_any_leaves? ⇒ Boolean
-
#initialize(path) ⇒ Asciidoc
constructor
A new instance of Asciidoc.
- #is_directory? ⇒ Boolean
- #is_leaves? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(path) ⇒ Asciidoc
Returns a new instance of Asciidoc.
6 7 8 9 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 6 def initialize(path) @path = path @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
4 5 6 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 4 def children @children end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 4 def path @path end |
Instance Method Details
#add_child(child) ⇒ Object
19 20 21 22 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 19 def add_child(child) return if child.nil? @children << child end |
#has_any_leaves? ⇒ Boolean
28 29 30 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 28 def has_any_leaves? traverse_file_tree(self) end |
#is_directory? ⇒ Boolean
15 16 17 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 15 def is_directory? File.directory?(path) end |
#is_leaves? ⇒ Boolean
11 12 13 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 11 def is_leaves? !is_directory? end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/asciidoctor/confluence_publisher/asciidoc.rb', line 24 def to_s inspect end |