Sha256: 33e73e36e6a568f807efa8b17a6c5f132af013adf936ff61bbe1d61291672181
Contents?: true
Size: 872 Bytes
Versions: 1
Compression:
Stored size: 872 Bytes
Contents
# frozen_string_literal: true require "dry/monads" require "pathname" require "runcom" module Milestoner module Configuration module Transformers module Build # Ensures XDG configuration and gem template paths are configured. class TemplatePaths include Dry::Monads[:result] def initialize key = :build_template_paths, default: Pathname(__dir__).join("../../../templates"), xdg_config: Runcom::Config.new("milestoner/templates") @key = key @default = default @xdg_config = xdg_config end def call content content[key] = xdg_config.all.append default Success content end private attr_reader :key, :default, :xdg_config end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
milestoner-17.0.0 | lib/milestoner/configuration/transformers/build/template_paths.rb |