Method: TTY::Tree::HashWalker#initialize

Defined in:
lib/tty/tree/hash_walker.rb

#initialize(options = {}) ⇒ HashWalker

Returns a new instance of HashWalker.

[View source]

19
20
21
22
23
24
25
# File 'lib/tty/tree/hash_walker.rb', line 19

def initialize(options = {})
  @nodes       = []
  @files_count = 0
  @dirs_count  = 0
  @level       = options.fetch(:level) { -1 }
  @file_limit  = options.fetch(:file_limit) { - 1 }
end