Class: IO

Inherits:
Object
  • Object
show all
Defined in:
lib/reek/source/core_extras.rb

Overview

Extensions to IO needed by Reek.

Instance Method Summary collapse

Instance Method Details

#to_reek_source(description = 'io') ⇒ Reek::Source::SourceCode

Creates a new Source that assumes this IO stream contains Ruby source code and prepares it to be examined for code smells.


28
29
30
# File 'lib/reek/source/core_extras.rb', line 28

def to_reek_source(description = 'io')
  Reek::Source::SourceCode.new(readlines.join, description)
end