Class: CaptiveStackDetector::FileReader
- Inherits:
-
Object
- Object
- CaptiveStackDetector::FileReader
- Defined in:
- lib/captive_stack_detector/file_reader.rb
Class Method Summary collapse
Class Method Details
.build(local_path: nil, github_token: nil, repo: nil) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/captive_stack_detector/file_reader.rb', line 9 def self.build(local_path: nil, github_token: nil, repo: nil) return LocalFileReader.new(local_path) if local_path return GithubFileReader.new(github_token, repo) if github_token && repo raise ArgumentError, "local_path: ou github_token: + repo: requis" end |