Sha256: eec31c5e1e579acc94ae21fc69002e41621fd76f4d2ff10c81260ffd1776eea4

Contents?: true

Size: 376 Bytes

Versions: 16

Compression:

Stored size: 376 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: home, environment: environment if xdg
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
runcom-7.3.0 lib/runcom/context.rb
runcom-7.2.0 lib/runcom/context.rb
runcom-7.1.3 lib/runcom/context.rb
runcom-7.1.2 lib/runcom/context.rb
runcom-7.1.1 lib/runcom/context.rb
runcom-7.1.0 lib/runcom/context.rb
runcom-7.0.0 lib/runcom/context.rb
runcom-6.6.0 lib/runcom/context.rb
runcom-6.5.0 lib/runcom/context.rb
runcom-6.4.0 lib/runcom/context.rb
runcom-6.3.0 lib/runcom/context.rb
runcom-6.2.0 lib/runcom/context.rb
runcom-6.1.1 lib/runcom/context.rb
runcom-6.1.0 lib/runcom/context.rb
runcom-6.0.1 lib/runcom/context.rb
runcom-6.0.0 lib/runcom/context.rb