lib/cc_engine/location/position.rb in codeclimate-engine-rb-0.4.1 vs lib/cc_engine/location/position.rb in codeclimate-engine-rb-0.4.2

- old
+ new

@@ -1,23 +1,25 @@ -require "virtus" - module CCEngine module Location class Position - include Virtus.model(strict: true) + def initialize(path:, start_position:, end_position:) + @path = path + @start_position = start_position + @end_position = end_position + end - attribute :path, String - attribute :start_position - attribute :end_position - 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