Sha256: a35d6d08253b5426b79667525ee331b92a8e03fbdd4ace50b34f1015a34ea19d

Contents?: true

Size: 365 Bytes

Versions: 7

Compression:

Stored size: 365 Bytes

Contents

module ReVIEW
  class Location
    def initialize(filename, compiler)
      @filename = filename
      @f = compiler
    end

    attr_reader :filename

    def lineno
      @f.current_line
    end

    def string
      begin
        "#{@filename}:#{self.lineno}"
      rescue
        "#{@filename}:nil"
      end
    end

    alias_method :to_s, :string
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
review-peg-0.2.2 lib/review/location.rb
review-peg-0.2.1 lib/review/location.rb
review-peg-0.2.0 lib/review/location.rb
review-peg-0.1.3 lib/review/location.rb
review-peg-0.1.2 lib/review/location.rb
review-peg-0.1.1 lib/review/location.rb
review-peg-0.1.0 lib/review/location.rb