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.5.4 test/obj_sample.rb
ox-1.5.3 test/obj_sample.rb
ox-1.5.2 test/obj_sample.rb
ox-1.5.1 test/obj_sample.rb
ox-1.5.0 test/obj_sample.rb
ox-1.4.6 test/obj_sample.rb
ox-1.4.5 test/obj_sample.rb
ox-1.4.4 test/obj_sample.rb
ox-1.4.3 test/obj_sample.rb
ox-1.4.2 test/obj_sample.rb
ox-1.4.1 test/obj_sample.rb
ox-1.4.0 test/obj_sample.rb
ox-1.3.5 test/obj_sample.rb
ox-1.3.4 test/obj_sample.rb
ox-1.3.3 test/obj_sample.rb
ox-1.3.2 test/obj_sample.rb
ox-1.3.1 test/obj_sample.rb
ox-1.3.0 test/obj_sample.rb
ox-1.2.15 test/obj_sample.rb
ox-1.2.14 test/obj_sample.rb