Sha256: 2ec7e30ca3742fcb394817d300b0aede7f3c57e9ab1305ae0b46984f3744a378

Contents?: true

Size: 326 Bytes

Versions: 40

Compression:

Stored size: 326 Bytes

Contents

require 'ox'

class Sample
  attr_accessor :a, :b, :c
  
  def initialize(a, b, c)
    @a = a
    @b = b
    @c = c
  end
end # File

# Create Object
obj = Sample.new(1, "bee", ['x', :y, 7.0])
# Now dump the Object to an XML String.
xml = Ox.dump(obj)
# Convert the object back into a Sample Object.
obj2 = Ox.parse_obj(xml)

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ox-1.2.13 test/obj_sample.rb
ox-1.2.12 test/obj_sample.rb
ox-1.2.11 test/obj_sample.rb
ox-1.2.10 test/obj_sample.rb
ox-1.2.9 test/obj_sample.rb
ox-1.2.8 test/obj_sample.rb
ox-1.2.7 test/obj_sample.rb
ox-1.2.6 test/obj_sample.rb
ox-1.2.5 test/obj_sample.rb
ox-1.2.4 test/obj_sample.rb
ox-1.2.3 test/obj_sample.rb
ox-1.2.2 test/obj_sample.rb
ox-1.2.1 test/obj_sample.rb
ox-1.2.0 test/obj_sample.rb
ox-1.1.1 test/obj_sample.rb
ox-1.1.0 test/obj_sample.rb
ox-1.0.3 test/obj_sample.rb
ox-1.0.2 test/obj_sample.rb
ox-1.0.1 test/obj_sample.rb
ox-1.0.0 test/obj_sample.rb