class LSync::Directory
A specific directory which is relative to the root of a given server. Specific configuration details such as excludes and other options may be specified.
Attributes
options[R]
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/lsync/directory.rb, line 67 def initialize(path) @path = Pathname.new(path).cleanpath.normalize_trailing_slash @options = {:arguments => []} if @path.absolute? raise AbsolutePathError.new("Path #{path} may not be absolute!", :path => path) end end
Public Instance Methods
exclude(pattern)
click to toggle source
Exclude a specific shell glob pattern.
# File lib/lsync/directory.rb, line 80 def exclude(pattern) # RSync specific... need to figure out if there is a good way to do this generally. @options[:arguments] += ["--exclude", pattern] end
to_s()
click to toggle source
A string representation of the path for logging.
# File lib/lsync/directory.rb, line 86 def to_s @path.to_s end