Sha256: d787891441ba46a876f073c75599dc3bfb622054cc50da03061a1ed08bdad5e0

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

module CCEngine
  module Location
    class Position
      def initialize(path:, start_position:, end_position:)
        @path = path
        @start_position = start_position
        @end_position = end_position
      end

      def to_hash
        {
          path: path,
          positions: {
            begin: start_position.to_hash,
            end: end_position.to_hash
          }
        }
      end

      private

      attr_reader :path, :start_position, :end_position
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
codeclimate-engine-rb-0.4.2 lib/cc_engine/location/position.rb