Sha256: ccbcedf94583811af0ff2c1c47a6ac2fb4212f145d312a4d5c754eba4553f53e
Contents?: true
Size: 449 Bytes
Versions: 1
Compression:
Stored size: 449 Bytes
Contents
module Stowaway class FileMarker attr :fullpath def initialize(fullpath, root = nil) @fullpath = fullpath @root = root || Dir.pwd end def name File.basename(@fullpath) end def path File.split(@fullpath)[0] end def root_path root = @root.split("/").last @fullpath.sub(/^.+\/#{root}/, "") end def ==(fileObj) self.fullpath == fileObj.fullpath end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stowaway-0.2.5 | lib/stowaway/file_marker.rb |