Parent

Class/Module Index [+]

Quicksearch

Reek::Source::SourceCode

A Source object represents a chunk of Ruby source code.

Attributes

desc[R]

Public Class Methods

err_io=(io) click to toggle source
# File lib/reek/source/source_code.rb, line 16
def err_io=(io)
  original = @@err_io
  @@err_io = io
  original
end
new(code, desc, parser = RubyParser.new) click to toggle source
# File lib/reek/source/source_code.rb, line 25
def initialize(code, desc, parser = RubyParser.new)
  @source = code
  @desc = desc
  @parser = parser
end

Public Instance Methods

configure(sniffer) click to toggle source
# File lib/reek/source/source_code.rb, line 31
def configure(sniffer) end
syntax_tree() click to toggle source
# File lib/reek/source/source_code.rb, line 33
def syntax_tree
  begin
    ast = @parser.parse(@source, @desc)
  rescue Exception => error
    @@err_io.puts "#{desc}: #{error.class.name}: #{error}"
  end
  ast ||= s()
  TreeDresser.new.dress(ast)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.