Class: Object

Inherits:
BasicObject
Defined in:
lib/reek/adapters/core_extras.rb,
lib/reek/adapters/object_source.rb

Instance Method Summary collapse

Instance Method Details

#sniffObject

Creates a new Sniffer that assumes this object contains Ruby source code and examines that code for smells. Calls to_reek_source on self to obtain the Source object wrapper.



10
11
12
# File 'lib/reek/adapters/core_extras.rb', line 10

def sniff
  Reek::Sniffer.new(self.to_reek_source)
end

#to_reek_sourceObject

Constructs a Sniffer which examines this object for code smells. (This feature is only enabled if you have the ParseTree gem installed.)



18
19
20
# File 'lib/reek/adapters/core_extras.rb', line 18

def to_reek_source
  ObjectSource.new(self, self.to_s)
end