Class: Reek::Source::SourceFile

Inherits:
SourceCode show all
Defined in:
lib/reek/source/source_file.rb

Overview

Represents a file of Ruby source, whose contents will be examined for code smells.

Instance Attribute Summary

Attributes inherited from SourceCode

#desc

Instance Method Summary collapse

Methods inherited from SourceCode

#syntax_tree

Constructor Details

#initialize(path) ⇒ SourceFile

Returns a new instance of SourceFile


10
11
12
13
# File 'lib/reek/source/source_file.rb', line 10

def initialize(path)
  @path = path
  super(IO.readlines(@path).join, @path)
end