Sha256: feae57e2a6c30f8691d8b8fb730d7545a037d2e8c020ba6ba798ec148e49a8b5
Contents?: true
Size: 858 Bytes
Versions: 17
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true require "pathname" require "refinements/hashes" require "refinements/structs" require "runcom" require "yaml" module SublimeTextKit module Configuration # Represents the fully assembled Command Line Interface (CLI) configuration. class Loader using Refinements::Hashes using Refinements::Structs DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze CLIENT = Runcom::Config.new "sublime_text_kit/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.flatten_keys) private attr_reader :content, :client end end end
Version data entries
17 entries across 17 versions & 1 rubygems