Module: Avm::EacAsciidoctorBase0::Sources::Document::Title
- Defined in:
- lib/avm/eac_asciidoctor_base0/sources/document/title.rb
Constant Summary collapse
- TITLE_BASENAME =
'title'
Instance Method Summary collapse
Instance Method Details
#default_title ⇒ String
14 15 16 |
# File 'lib/avm/eac_asciidoctor_base0/sources/document/title.rb', line 14 def default_title root_path.basename.to_s.humanize.split(/\s+/).map(&:upcase_first).join(' ') end |
#title ⇒ String
19 20 21 |
# File 'lib/avm/eac_asciidoctor_base0/sources/document/title.rb', line 19 def title title_path.exist? ? title_path.read.strip : default_title end |
#title_path ⇒ Pathname
24 25 26 |
# File 'lib/avm/eac_asciidoctor_base0/sources/document/title.rb', line 24 def title_path root_path.join(TITLE_BASENAME) end |