Class: FileInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/tipster/files/file_info.rb

Instance Method Summary collapse

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_countObject



6
7
8
# File 'lib/tipster/files/file_info.rb', line 6

def line_count
  File.readlines(@file_name).length
end