Class: XDG::Paths::Combined

Inherits:
Object
  • Object
show all
Defined in:
lib/xdg/paths/combined.rb

Overview

The combined home and directory paths.

Instance Method Summary collapse

Constructor Details

#initialize(initial_home, initial_directories) ⇒ Combined

Returns a new instance of Combined.



9
10
11
12
# File 'lib/xdg/paths/combined.rb', line 9

def initialize initial_home, initial_directories
  @initial_home = initial_home
  @initial_directories = initial_directories
end

Instance Method Details

#allObject



18
# File 'lib/xdg/paths/combined.rb', line 18

def all = directories.prepend(*home)

#directoriesObject



16
# File 'lib/xdg/paths/combined.rb', line 16

def directories = initial_directories.dynamic

#homeObject



14
# File 'lib/xdg/paths/combined.rb', line 14

def home = initial_home.dynamic

#inspectObject



24
# File 'lib/xdg/paths/combined.rb', line 24

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

#to_sObject Also known as: to_str



20
# File 'lib/xdg/paths/combined.rb', line 20

def to_s = [initial_home.to_s, initial_directories.to_s].reject(&:empty?).join " "