Class: Fasterer::Github::GhTraverser

Inherits:
Object
  • Object
show all
Defined in:
lib/fasterer/github/gh_traverser.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, repo, path, ignored_paths) ⇒ GhTraverser

Returns a new instance of GhTraverser.



6
7
8
9
10
11
# File 'lib/fasterer/github/gh_traverser.rb', line 6

def initialize(owner, repo, path, ignored_paths)
  @owner = owner
  @repo = repo
  @path = path.to_s
  @ignored_paths = ignored_paths.map { |i| i.chomp("/") }
end

Instance Method Details

#api_errorsObject



21
22
23
# File 'lib/fasterer/github/gh_traverser.rb', line 21

def api_errors
  @api_errors ||= []
end

#collected_dataObject



17
18
19
# File 'lib/fasterer/github/gh_traverser.rb', line 17

def collected_data
  @collected_data ||= []
end

#traverseObject



13
14
15
# File 'lib/fasterer/github/gh_traverser.rb', line 13

def traverse
  catch(:rate_limit) { collect_data(path) }
end