Sha256: 050589a7cb32d565a9d4042f9d60191ed3c89b97dfc1c6fadcccae22fcb0c21a
Contents?: true
Size: 838 Bytes
Versions: 6
Compression:
Stored size: 838 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) = Success content.merge!(key => xdg_config.all.append(default)) private attr_reader :key, :default, :xdg_config end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems