Sha256: 24c5ff6cfd1db0776c849f068f130ce02130857b63e3684b0f238f708848a1b0

Contents?: true

Size: 627 Bytes

Versions: 7

Compression:

Stored size: 627 Bytes

Contents

# Copyright (c) 2009-2019 Minero Aoki, Kenshi Muto, Masayoshi Takahashi
# Copyright (c) 2002-2007 Minero Aoki
#
# This program is free software.
# You can distribute or modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#

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

    attr_reader :filename

    def lineno
      @f.lineno
    end

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

    alias_method :to_s, :string
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
review-5.10.0 lib/review/location.rb
review-5.9.0 lib/review/location.rb
review-5.8.0 lib/review/location.rb
review-5.7.0 lib/review/location.rb
review-5.6.0 lib/review/location.rb
review-5.5.0 lib/review/location.rb
review-5.4.0 lib/review/location.rb