class Bosh::Cli::GlobMatch
Attributes
dir[R]
Helper class encapsulating the data we know about the glob. We need both directory and file path, as we match the same path in several directories (src, src_alt, blobs)
path[R]
Public Class Methods
new(dir, path)
click to toggle source
# File lib/cli/glob_match.rb, line 9 def initialize(dir, path) @dir = dir @path = path end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/cli/glob_match.rb, line 18 def <=>(other) @path <=> other.path end
eql?(other)
click to toggle source
GlobMatch
will be used as Hash key (as implied by using Set), hence we need to define both eql? and hash
# File lib/cli/glob_match.rb, line 24 def eql?(other) @path == other.path end
full_path()
click to toggle source
# File lib/cli/glob_match.rb, line 14 def full_path File.join(dir, path) end
hash()
click to toggle source
# File lib/cli/glob_match.rb, line 28 def hash @path.hash end