Class: FileInfo
- Inherits:
-
Object
- Object
- FileInfo
- Defined in:
- lib/tipster/files/file_info.rb
Instance Method Summary collapse
-
#initialize(file_name) ⇒ FileInfo
constructor
A new instance of FileInfo.
- #line_count ⇒ Object
Constructor Details
#initialize(file_name) ⇒ FileInfo
Returns a new instance of FileInfo.
2 3 4 |
# File 'lib/tipster/files/file_info.rb', line 2 def initialize(file_name) @file_name = file_name end |
Instance Method Details
#line_count ⇒ Object
6 7 8 |
# File 'lib/tipster/files/file_info.rb', line 6 def line_count File.readlines(@file_name).length end |