Sha256: 7c57f5941d6a12232ace00900da9c242f79861af0b8d6163022533e91eef69ae
Contents?: true
Size: 771 Bytes
Versions: 21
Compression:
Stored size: 771 Bytes
Contents
require "thor" require "metanorma-utils" module Metanorma module Cli class ThorWithConfig < Thor Hash.include Metanorma::Utils::Hash Array.include Metanorma::Utils::Array no_commands do def options original_options = super.to_hash.symbolize_all_keys Thor::CoreExt::HashWithIndifferentAccess.new( Metanorma::Cli::Commands::Config.load_configs(original_options), ) end def filter_compile_options(options) copts = %w[ agree_to_terms install_fonts continue_without_fonts progress strict ] options.select { |k, _| copts.include?(k) }.symbolize_all_keys end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems