Class: Anamo::Fstree::Traverser

Inherits:
Object
  • Object
show all
Defined in:
lib/anamo/fstree/thor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_path = '/', writer = Writer.new, max_depth = 2, exclusions = []) ⇒ Traverser

Returns a new instance of Traverser.



57
58
59
60
61
62
# File 'lib/anamo/fstree/thor.rb', line 57

def initialize base_path = '/', writer = Writer.new, max_depth = 2, exclusions = []
  @max_depth = max_depth
  @base_path = base_path
  @writer = writer
  @exclusions = exclusions
end

Instance Attribute Details

#base_pathObject (readonly)

Returns the value of attribute base_path.



55
56
57
# File 'lib/anamo/fstree/thor.rb', line 55

def base_path
  @base_path
end

Instance Method Details

#computeObject



64
65
66
67
# File 'lib/anamo/fstree/thor.rb', line 64

def compute
  walk_path @base_path
  @writer.close
end