Sha256: 08f1c50d64713c49a660675d703a01f0fd282b20e78ce536788a55dbe8c746c0

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module Runcom
  # A developer friendly wrapper of XDG config.
  class Config
    extend Forwardable

    CONTEXT = Context.new xdg: XDG::Config

    delegate %i[initial namespace file_name active passive global local all to_s to_str] => :common

    def initialize path, context: CONTEXT
      @common = Paths::Common.new(path, context:)
      freeze
    end

    def inspect = "#<#{self.class}:#{object_id} #{common}>"

    private

    attr_reader :common
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
runcom-12.1.0 lib/runcom/config.rb
runcom-12.0.0 lib/runcom/config.rb