Sha256: b519800ae77b92264a7c3cad2d5404d4307721b471abb9ebf0cd39dcfdb9ff97

Contents?: true

Size: 361 Bytes

Versions: 1

Compression:

Stored size: 361 Bytes

Contents

# frozen_string_literal: true

module Runcom
  # A common context for all XDG custom objects.
  Context = Struct.new :defaults, :home, :environment, :xdg, keyword_init: true do
    def initialize *arguments
      super

      self[:home] ||= Paths::Home
      self[:environment] ||= ENV

      self[:xdg] = xdg.new(home:, environment:) if xdg
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
runcom-8.7.0 lib/runcom/context.rb