lib/xdg/paths/directory.rb in xdg-5.1.0 vs lib/xdg/paths/directory.rb in xdg-5.1.1
- old
+ new
@@ -11,38 +11,28 @@
def initialize pair, environment = ENV
@pair = pair
@environment = environment
end
- def default
- value.split(DELIMITER).map { |path| expand path }
- end
+ def default = value.split(DELIMITER).map { |path| expand path }
def dynamic
String(environment[key]).then { |env_value| env_value.empty? ? value : env_value }
.split(DELIMITER)
.uniq
.map { |path| expand path }
end
- def inspect
- [key, dynamic.join(DELIMITER)].reject(&:empty?).join XDG::PAIR_DELIMITER
- end
+ def inspect = [key, dynamic.join(DELIMITER)].reject(&:empty?).join(XDG::PAIR_DELIMITER)
private
attr_reader :pair, :environment
- def key
- String pair.key
- end
+ def key = String(pair.key)
- def value
- String pair.value
- end
+ def value = String(pair.value)
- def expand path
- Pathname(path).expand_path
- end
+ def expand(path) = Pathname(path).expand_path
end
end
end