Class: GistGenerator::File
- Inherits:
-
Object
- Object
- GistGenerator::File
- Defined in:
- lib/gist_generator/file.rb
Instance Method Summary collapse
-
#initialize(repo_path, file_path, options) ⇒ File
constructor
A new instance of File.
- #lines ⇒ Object
- #number_of_lines ⇒ Object
Constructor Details
#initialize(repo_path, file_path, options) ⇒ File
Returns a new instance of File.
6 7 8 9 10 |
# File 'lib/gist_generator/file.rb', line 6 def initialize(repo_path, file_path, ) @repo_path = repo_path @file_path = file_path @options = end |
Instance Method Details
#lines ⇒ Object
12 13 14 |
# File 'lib/gist_generator/file.rb', line 12 def lines @lines ||= Faraday.get(content.download_url).body.lines end |
#number_of_lines ⇒ Object
16 17 18 |
# File 'lib/gist_generator/file.rb', line 16 def number_of_lines lines.length end |