Class: XDG::Paths::Combined
- Inherits:
-
Object
- Object
- XDG::Paths::Combined
- Defined in:
- lib/xdg/paths/combined.rb
Overview
The combined home and directory paths.
Instance Method Summary collapse
- #all ⇒ Object
- #directories ⇒ Object
- #home ⇒ Object
-
#initialize(initial_home, initial_directories) ⇒ Combined
constructor
A new instance of Combined.
- #inspect ⇒ Object
- #to_s ⇒ Object (also: #to_str)
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
#all ⇒ Object
18 |
# File 'lib/xdg/paths/combined.rb', line 18 def all = directories.prepend(*home) |
#directories ⇒ Object
16 |
# File 'lib/xdg/paths/combined.rb', line 16 def directories = initial_directories.dynamic |
#home ⇒ Object
14 |
# File 'lib/xdg/paths/combined.rb', line 14 def home = initial_home.dynamic |
#inspect ⇒ Object
24 |
# File 'lib/xdg/paths/combined.rb', line 24 def inspect = "#<#{self.class}:#{object_id} #{self}>" |
#to_s ⇒ Object 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 " " |