Sha256: 1fd4d1849cbaa0219966bd3d23895453cf4264be4b04cf1c40b9a49fcd124c5f

Contents?: true

Size: 336 Bytes

Versions: 5

Compression:

Stored size: 336 Bytes

Contents

# frozen_string_literal: true

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

      self[:home] ||= Paths::Home
      self[:environment] ||= ENV
      self[:xdg] = xdg.new(home:, environment:) if xdg

      freeze
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
runcom-10.2.1 lib/runcom/context.rb
runcom-10.2.0 lib/runcom/context.rb
runcom-10.1.0 lib/runcom/context.rb
runcom-10.0.1 lib/runcom/context.rb
runcom-10.0.0 lib/runcom/context.rb