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
15 16 17 18 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 15 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
21 22 23 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 21 def default_theme_directory path.join(DEFAULT_THEME_DIRECTORY_SUBPATH) end |
#theme_directory ⇒ Pathname
26 27 28 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 26 def theme_directory theme_directory_by_configuration || default_theme_directory end |
#theme_directory_by_configuration ⇒ Pathname
31 32 33 34 35 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 31 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
38 39 40 |
# File 'lib/avm/eac_asciidoctor_base0/sources/base/theme.rb', line 38 def theme_stylesheet_path theme_directory.join(THEME_STYLESHEET_BASENAME) end |