Module: Avm::EacAsciidoctorBase0::Sources::Base::Theme
- Defined in:
- lib/avm/eac_asciidoctor_base0/sources/base/theme.rb
Constant Summary collapse
- CONFIGURATION_THEME_KEY =
'theme'- DEFAULT_THEME_DIRECTORY_SUBPATH =
'theme'- THEME_STYLESHEET_BASENAME =
'main.css'
Instance Method Summary collapse
- #copy_theme_directory_to(target_directory_path) ⇒ Object
- #default_theme_directory ⇒ Pathname
- #theme_directory ⇒ Pathname
- #theme_directory_by_configuration ⇒ Pathname
- #theme_stylesheet_path ⇒ Pathname
Instance Method Details
#copy_theme_directory_to(target_directory_path) ⇒ Object
16 17 18 19 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 16 def copy_theme_directory_to(target_directory_path) target_directory_path.parent.mkpath ::FileUtils.copy_entry(theme_directory, target_directory_path) end |
#default_theme_directory ⇒ Pathname
22 23 24 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 22 def default_theme_directory path.join(DEFAULT_THEME_DIRECTORY_SUBPATH) end |
#theme_directory ⇒ Pathname
27 28 29 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 27 def theme_directory theme_directory_by_configuration || default_theme_directory end |
#theme_directory_by_configuration ⇒ Pathname
32 33 34 35 36 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 32 def theme_directory_by_configuration configuration_entry(CONFIGURATION_THEME_KEY).value.if_present do |v| v.to_pathname.(path) end end |
#theme_stylesheet_path ⇒ Pathname
39 40 41 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 39 def theme_stylesheet_path theme_directory.join(THEME_STYLESHEET_BASENAME) end |