Class | Nitpick::Nitpicker |
In: |
lib/nitpick/nitpicker.rb
|
Parent: | SexpProcessor |
warnings | [RW] |
# File lib/nitpick/nitpicker.rb, line 5 def initialize(klass, meth) super() self.auto_shift_type = true self.strict = false self.expected = Sexp @unsupported.delete(:cfunc) @class = klass @method = meth @warnings = [] end
# File lib/nitpick/nitpicker.rb, line 17 def nitpick! process(ParseTree.translate(@class, @method)) end
# File lib/nitpick/nitpicker.rb, line 33 def process_defn(exp) method = exp.shift result = s(:defn, method) until exp.empty? result << process(exp.shift) end result end
# File lib/nitpick/nitpicker.rb, line 21 def scan_for(warning_classes, options = {}) matched_warnings = warning_classes.map do |warning_class| warning_class.discover(options[:with]) end warn(*matched_warnings) end