Sha256: 38fa1e8e5feb54ca803b0c03a5a6972a5d31406982ec7c000131df1478a63172
Contents?: true
Size: 387 Bytes
Versions: 9
Compression:
Stored size: 387 Bytes
Contents
# frozen_string_literal: true require_relative "setup" require "ryo" point_x = Ryo(x: 5) point_y = Ryo({y: 10}, point_x) point = Ryo({}, point_y) p Ryo.find(point, ancestors: 0) { |k,v| v == 5 } # => nil p Ryo.find(point, ancestors: 1) { |k,v| v == 5 } # => nil p Ryo.find(point, ancestors: 2) { |k,v| v == 5 }.x # => point_x.x p Ryo.find(point) { |k,v| v == 5 }.x # => point_x.x
Version data entries
9 entries across 9 versions & 1 rubygems