class CassetteRack::Tree::Leaf
Attributes
id[R]
level[R]
name[R]
path[R]
trunk[R]
Public Class Methods
new(path, level=0, trunk=nil)
click to toggle source
# File lib/cassette-rack/tree/leaf.rb, line 6 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
Public Instance Methods
leaf?()
click to toggle source
# File lib/cassette-rack/tree/leaf.rb, line 21 def leaf? true end