module JRuby::Lint::Checker

Attributes

collector[RW]

Public Class Methods

included(cls) click to toggle source
# File lib/jruby/lint/checkers.rb, line 5
def self.included(cls)
  loaded_checkers << cls
end
loaded_checkers() click to toggle source
# File lib/jruby/lint/checkers.rb, line 9
def self.loaded_checkers
  @checkers ||= []
end

Public Instance Methods

grand_parent() click to toggle source
# File lib/jruby/lint/checkers.rb, line 21
def grand_parent
  collector.stack.size >= 3 ? collector.stack[-3] : nil 
end
parent() click to toggle source

What is parent during visit of the current node being visited.

# File lib/jruby/lint/checkers.rb, line 17
def parent
  collector.stack.size >= 2 ? collector.stack[-2] : nil 
end
src_line(line) click to toggle source

source line with line node provides

# File lib/jruby/lint/checkers.rb, line 27
def src_line(line)
  collector.contents.split(/\n/)[line]
end