Class: XDG::Data

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/xdg/data.rb

Overview

Provides data support.

Constant Summary collapse

HOME_PAIR =
Pair["XDG_DATA_HOME", ".local/share"].freeze
DIRS_PAIR =
Pair["XDG_DATA_DIRS", "/usr/local/share:/usr/share"].freeze

Instance Method Summary collapse

Constructor Details

#initialize(home: Paths::Home, directories: Paths::Directory, environment: ENV) ⇒ Data

Returns a new instance of Data.



16
17
18
19
# File 'lib/xdg/data.rb', line 16

def initialize home: Paths::Home, directories: Paths::Directory, environment: ENV
  @combined = Paths::Combined.new home.new(HOME_PAIR, environment),
                                  directories.new(DIRS_PAIR, environment)
end

Instance Method Details

#inspectObject



21
# File 'lib/xdg/data.rb', line 21

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