Module: Codesake::Utils::Files

Included in:
Engine::Generic, Engine::Jsp, Engine::Text
Defined in:
lib/codesake/utils/files.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#file_contentObject (readonly)

Returns the value of attribute file_content.



6
7
8
# File 'lib/codesake/utils/files.rb', line 6

def file_content
  @file_content
end

#filenameObject

Returns the value of attribute filename.



5
6
7
# File 'lib/codesake/utils/files.rb', line 5

def filename
  @filename
end

Instance Method Details

#linesObject



13
14
15
# File 'lib/codesake/utils/files.rb', line 13

def lines
  @file_content.count
end

#lines_of_commentObject



17
18
19
# File 'lib/codesake/utils/files.rb', line 17

def lines_of_comment
  0
end

#locObject



20
21
22
# File 'lib/codesake/utils/files.rb', line 20

def loc
  0
end

#read_fileObject



8
9
10
11
# File 'lib/codesake/utils/files.rb', line 8

def read_file
  @file_content = []
  @file_content = File.readlines(@filename) if File.exists?(@filename)
end