Sha256: fd07f5d69c48892dc00dacabca8fce7038dbde2e6561ad3caf57dc7cd8da2a18

Contents?: true

Size: 212 Bytes

Versions: 9

Compression:

Stored size: 212 Bytes

Contents

# frozen_string_literal: true

require_relative "setup"
require "ryo"
require "ostruct"

point = Ryo.from(
  OpenStruct.new(x: {to_i: 5}),
  Ryo.from(y: {to_i: 10})
)
p [point.x.to_i, point.y.to_i]

##
# [5, 10]

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ryo.rb-0.5.5 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.5.3 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.5.2 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.5.1 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.5.0 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.4.7 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.4.6 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.4.5 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb
ryo.rb-0.4.4 share/ryo.rb/examples/3.2_recursion_ryo_from_with_openstruct.rb