Class: Fasterer::Github::GhTraverser
- Inherits:
-
Object
- Object
- Fasterer::Github::GhTraverser
- Defined in:
- lib/fasterer/github/gh_traverser.rb
Instance Method Summary collapse
- #api_errors ⇒ Object
- #collected_data ⇒ Object
-
#initialize(owner, repo, path, ignored_paths) ⇒ GhTraverser
constructor
A new instance of GhTraverser.
- #traverse ⇒ Object
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_errors ⇒ Object
21 22 23 |
# File 'lib/fasterer/github/gh_traverser.rb', line 21 def api_errors @api_errors ||= [] end |
#collected_data ⇒ Object
17 18 19 |
# File 'lib/fasterer/github/gh_traverser.rb', line 17 def collected_data @collected_data ||= [] end |
#traverse ⇒ Object
13 14 15 |
# File 'lib/fasterer/github/gh_traverser.rb', line 13 def traverse catch(:rate_limit) { collect_data(path) } end |