Class: CaptiveStackDetector::GithubFileReader

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/captive_stack_detector/file_reader.rb

Instance Method Summary collapse

Constructor Details

#initialize(token, repo) ⇒ GithubFileReader

Returns a new instance of GithubFileReader.



38
39
40
41
# File 'lib/captive_stack_detector/file_reader.rb', line 38

def initialize(token, repo)
  @client = GithubApiClient.new(token, repo)
  @parser = FileContentParser.new(self)
end

Instance Method Details

#read(filename) ⇒ Object



43
44
45
# File 'lib/captive_stack_detector/file_reader.rb', line 43

def read(filename)
  @client.fetch(filename)
end