Sha256: 70239bb81959c8661564cf60cd0663fe096bc6f9a306c4324a6ca70039098dee

Contents?: true

Size: 1.15 KB

Versions: 19

Compression:

Stored size: 1.15 KB

Contents

# This code was automatically generated using xdrgen
# DO NOT EDIT or your changes may be overwritten

require 'xdr'

# === xdr source ============================================================
#
#   union Asset switch (AssetType type)
#   {
#   case ASSET_TYPE_NATIVE: // Not credit
#       void;
#   
#   case ASSET_TYPE_CREDIT_ALPHANUM4:
#       struct
#       {
#           opaque assetCode[4]; // 1 to 4 characters
#           AccountID issuer;
#       } alphaNum4;
#   
#   case ASSET_TYPE_CREDIT_ALPHANUM12:
#       struct
#       {
#           opaque assetCode[12]; // 5 to 12 characters
#           AccountID issuer;
#       } alphaNum12;
#   
#       // add other asset types here in the future
#   };
#
# ===========================================================================
module Stellar
  class Asset < XDR::Union
    include XDR::Namespace

    autoload :AlphaNum4
    autoload :AlphaNum12

    switch_on AssetType, :type

    switch :asset_type_native
    switch :asset_type_credit_alphanum4,  :alpha_num4
    switch :asset_type_credit_alphanum12, :alpha_num12

    attribute :alpha_num4,  AlphaNum4
    attribute :alpha_num12, AlphaNum12
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
stellar-base-0.19.0 generated/stellar/asset.rb
stellar-base-0.18.0 generated/stellar/asset.rb
stellar-base-0.17.0 generated/stellar/asset.rb
stellar-base-0.16.0 generated/stellar/asset.rb
stellar-base-0.15.0 generated/stellar/asset.rb
stellar-base-0.14.0 generated/stellar/asset.rb
stellar-base-0.13.0 generated/stellar/asset.rb
stellar-base-0.12.0 generated/stellar/asset.rb
stellar-base-0.11.0 generated/stellar/asset.rb
auction-ruby-base-0.1.3 generated/stellar/asset.rb
auction-ruby-base-0.1.2 generated/stellar/asset.rb
auction-ruby-base-0.1.1 generated/stellar/asset.rb
stellar-base-0.10.0 generated/stellar/asset.rb
stellar-base-0.9.0 generated/stellar/asset.rb
stellar-base-0.8.0 generated/stellar/asset.rb
stellar-base-0.7.0 generated/stellar/asset.rb
stellar-base-0.6.1 generated/stellar/asset.rb
stellar-base-0.6.0 generated/stellar/asset.rb
stellar-base-0.5.0 generated/stellar/asset.rb