Sha256: 1be7dbada0bbda73f1ef00223834343a0be092b9d7a21f2d69fa3f99b1d9dafc

Contents?: true

Size: 358 Bytes

Versions: 11

Compression:

Stored size: 358 Bytes

Contents

# frozen_string_literal: true

module Runcom
  # A common context for all XDG custom objects.
  Context = ::Data.define :home, :environment, :xdg do
    def initialize home: Paths::Home, environment: ENV, xdg: nil
      computed_xdg = xdg.is_a?(Class) ? xdg.new(home:, environment:) : xdg
      super home:, environment:, xdg: computed_xdg
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
runcom-11.10.0 lib/runcom/context.rb
runcom-11.9.0 lib/runcom/context.rb
runcom-11.8.0 lib/runcom/context.rb
runcom-11.7.0 lib/runcom/context.rb
runcom-11.6.0 lib/runcom/context.rb
runcom-11.5.0 lib/runcom/context.rb
runcom-11.4.1 lib/runcom/context.rb
runcom-11.3.0 lib/runcom/context.rb
runcom-11.2.0 lib/runcom/context.rb
runcom-11.1.0 lib/runcom/context.rb
runcom-11.0.0 lib/runcom/context.rb