Parent

Files

RailsBestPractices::Checks::Check

Attributes

errors[R]

Public Class Methods

new() click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 16
def initialize
  @errors = []
end

Public Instance Methods

add_error(error, file = nil, line = nil) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 57
def add_error(error, file = nil, line = nil)
  file ||= @node.file
  line ||= @node.line
  @errors << RailsBestPractices::Core::Error.new("#{file}", "#{line}", error)
end
evaluate_end(node) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 38
def evaluate_end(node)
end
evaluate_node(position, node) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 41
def evaluate_node(position, node)
  @node = node
  eval_method = "evaluate_#{position}_#{node.node_type}"
  self.send(eval_method, node)
end
evaluate_node_end(node) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 52
def evaluate_node_end(node)
  evaluate_node(:end, node)
  evaluate_end(node)
end
evaluate_node_start(node) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 47
def evaluate_node_start(node)
  evaluate_node(:start, node)
  evaluate_start(node)
end
evaluate_start(node) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 35
def evaluate_start(node)
end
interesting_files() click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 20
def interesting_files
  /.*/
end
position(offset = 0) click to toggle source
# File lib/rails_best_practices/checks/check.rb, line 31
def position(offset = 0)
  "#{@line[2]}:#{@line[1] + offset}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.