Parent

Roodi::Core::Runner

Constants

DEFAULT_CONFIG

Attributes

config[W]

Public Class Methods

new(*checks) click to toggle source
# File lib/roodi/core/runner.rb, line 15
def initialize(*checks)
  @config = DEFAULT_CONFIG
  @checks = checks unless checks.empty?
  @parser = Parser.new
end

Public Instance Methods

check(filename, content) click to toggle source
# File lib/roodi/core/runner.rb, line 21
def check(filename, content)
  @checks ||= load_checks
  @checker ||= CheckingVisitor.new(@checks)
  @checks.each {|check| check.start_file(filename)}
  node = parse(filename, content)
  node.accept(@checker) if node
  @checks.each {|check| check.end_file(filename)}
end
check_content(content, filename = "dummy-file.rb") click to toggle source
# File lib/roodi/core/runner.rb, line 30
def check_content(content, filename = "dummy-file.rb")
  check(filename, content)
end
check_file(filename) click to toggle source
# File lib/roodi/core/runner.rb, line 34
def check_file(filename)
  check(filename, File.read(filename))
end
errors() click to toggle source
# File lib/roodi/core/runner.rb, line 52
def errors
  @checks ||= []
  all_errors = @checks.collect {|check| check.errors}
  all_errors.flatten
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.