Sha256: f250512215ee4b7cbd96a6a8e0753df5e537121b53a7ac292f54cf7750543a26

Contents?: true

Size: 453 Bytes

Versions: 5

Compression:

Stored size: 453 Bytes

Contents

module Roodi
  module Checks
    class Check
      def initialize
        @errors = []
      end
  
      def position(offset = 0)
        "#{@line[2]}:#{@line[1] + offset}"
      end
  
      def evaluate_node_at_line(node, line)
        @line = line
        evaluate(node)
      end
  
      def add_error(error, offset = 0)
        @errors << "#{position(offset)} - #{error}"
      end
  
      def errors
        @errors
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roodi-0.5 lib/roodi/checks/check.rb
roodi-1.1.0 lib/roodi/checks/check.rb
roodi-1.3.0 lib/roodi/checks/check.rb
roodi-1.1.1 lib/roodi/checks/check.rb
roodi-1.2.0 lib/roodi/checks/check.rb