Sha256: 6c3a139b01e4812155ee598b156087a6b2bb11aedc787039976e9e382876f3a6
Contents?: true
Size: 536 Bytes
Versions: 9
Compression:
Stored size: 536 Bytes
Contents
module CassetteRack module Tree class Leaf attr_reader :name, :path, :level, :trunk, :id def initialize(path, level=0, trunk=nil) @name = File.basename(path, '.*') @path = File.expand_path(path) if trunk.nil? @level = level @trunk = path @id = :root else @level = level + 1 @trunk = trunk @id = "#{File.dirname(@path)}/#{@name}".sub(trunk, '') end end def leaf? true end end end end
Version data entries
9 entries across 9 versions & 1 rubygems