Skip to content

pharo-ide/ObjectTravel

Repository files navigation

ObjectTravel

GitHub release Unit Tests

Pharo 7.0 Pharo 8.0 Pharo 9.0 Pharo 10 Pharo 11

Object traveler is a tool to traverse full object graph. It allows enumerate each reference of given object in breadth-first direction and visit every reference only once.

traveler := ObjectTraveler on: 10@30.
traveler moveToNextReference. "true".
traveler currentReference. "10"
traveler nextReference. "30"
traveler := ObjectTraveler on: #(10 20 30).
traveler nextReference "10"
traveler nextReference "20"

Installation

Metacello new
  baseline: 'ObjectTravel';
  repository: 'github://pharo-ide/ObjectTravel';
  load

Use following snippet for stable dependency in your project baseline:

spec
    baseline: 'ObjectTravel'
    with: [ spec repository: 'github://pharo-ide/ObjectTravel:v1.0.0' ]