class CCEngine::Location::Position

Attributes

end_position[R]
path[R]
start_position[R]

Public Class Methods

new(path:, start_position:, end_position:) click to toggle source
# File lib/cc_engine/location/position.rb, line 4
def initialize(path:, start_position:, end_position:)
  @path = path
  @start_position = start_position
  @end_position = end_position
end

Public Instance Methods

to_hash() click to toggle source
# File lib/cc_engine/location/position.rb, line 10
def to_hash
  {
    path: path,
    positions: {
      begin: start_position.to_hash,
      end: end_position.to_hash
    }
  }
end