Sha256: 5b9aceae2cf6bb000b73102ec2a2da2ab87cba098c2a3ddae135ad3245046faa
Contents?: true
Size: 995 Bytes
Versions: 12
Compression:
Stored size: 995 Bytes
Contents
require "lutaml/model" class Vase < Lutaml::Model::Serializable attribute :height, Lutaml::Model::Type::Float attribute :diameter, Lutaml::Model::Type::Float attribute :material, Lutaml::Model::Type::String attribute :manufacturer, Lutaml::Model::Type::String json do map "height", to: :height map "diameter", to: :diameter map "material", to: :material map "manufacturer", to: :manufacturer end yaml do map "height", to: :height map "diameter", to: :diameter map "material", to: :material map "manufacturer", to: :manufacturer end toml do map "height", to: :height map "diameter", to: :diameter map "material", to: :material map "manufacturer", to: :manufacturer end xml do root "vase" namespace "https://example.com/vase/1.0" map_element "height", to: :height map_element "diameter", to: :diameter map_element "material", to: :material map_attribute "manufacturer", to: :manufacturer end end
Version data entries
12 entries across 12 versions & 1 rubygems