Sha256: 087703e5066b0426a2f8e44baffd258acaa84538e0f3033effe3ba36d9714b22
Contents?: true
Size: 764 Bytes
Versions: 16
Compression:
Stored size: 764 Bytes
Contents
# frozen_string_literal: true require "pathname" require "refinements/structs" require "runcom" require "yaml" module Tocer module Configuration # Represents the fully assembled Command Line Interface (CLI) configuration. class Loader using Refinements::Structs DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze CLIENT = Runcom::Config.new "tocer/configuration.yml", defaults: DEFAULTS def self.call = new.call def self.with_defaults = new(client: DEFAULTS) def initialize content: Content.new, client: CLIENT @content = content @client = client end def call = content.merge(**client.to_h) private attr_reader :content, :client end end end
Version data entries
16 entries across 16 versions & 1 rubygems