Sha256: a246d5ab6b0d08c3fe74392d81282fc26876de07f480077584b29075b803f953
Contents?: true
Size: 1.26 KB
Versions: 6
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true require 'asciidoctor' require 'eac_ruby_utils/core_ext' module Avm module EacAsciidoctorBase0 module Sources class Base module Theme CONFIGURATION_THEME_KEY = 'theme' DEFAULT_THEME_DIRECTORY_SUBPATH = 'theme' THEME_STYLESHEET_BASENAME = 'main.css' # @param target_directory_path [Pathname] def copy_theme_directory_to(target_directory_path) target_directory_path.parent.mkpath ::FileUtils.copy_entry(theme_directory, target_directory_path) end # @return [Pathname] def default_theme_directory path.join(DEFAULT_THEME_DIRECTORY_SUBPATH) end # @return [Pathname] def theme_directory theme_directory_by_configuration || default_theme_directory end # @return [Pathname] def theme_directory_by_configuration configuration_entry(CONFIGURATION_THEME_KEY).value.if_present do |v| v.to_pathname.expand_path(path) end end # @return [Pathname] def theme_stylesheet_path theme_directory.join(THEME_STYLESHEET_BASENAME) end end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems