Sha256: 46928c9bdc48ef6b41cb566f1e64f1e0f9bd41494bbe779a93ba1446f2411289
Contents?: true
Size: 450 Bytes
Versions: 8
Compression:
Stored size: 450 Bytes
Contents
require 'xattr' Xattr.class_eval do # Accept follow_symlinks as second attribute def initialize(path, follow_symlinks = true) @path = path @follow_symlinks = follow_symlinks end alias_method :[], :get alias_method :[]=, :set end class FSPath < Pathname # Xattr instance for path def xattr Xattr.new(@path) end # Xattr instance for path which doesn't follow symlinks def lxattr Xattr.new(@path, false) end end
Version data entries
8 entries across 8 versions & 1 rubygems