Sha256: 78a1df63591a7eccccd76b83edbb6fd66da34c7435cb516c0863b90750f9819f

Contents?: true

Size: 406 Bytes

Versions: 11

Compression:

Stored size: 406 Bytes

Contents

module Stellar
  class AccountFlags


    # 
    # Converts an array of Stellar::AccountFlags members into
    # an Integer suitable for use in a SetOptionsOp.
    # 
    # @param flags=nil [Array<Stellar::AccountFlags>] the flags to combine
    # 
    # @return [Fixnum] the combined result
    def self.make_mask(flags=nil)
      flags ||= []

      flags.map(&:value).inject(&:|) || 0
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
stellar-base-0.0.13 lib/stellar/account_flags.rb
stellar-base-0.0.12 lib/stellar/account_flags.rb
stellar-base-0.0.11 lib/stellar/account_flags.rb
stellar-base-0.0.10 lib/stellar/account_flags.rb
stellar-base-0.0.9 lib/stellar/account_flags.rb
stellar-base-0.0.8 lib/stellar/account_flags.rb
stellar-base-0.0.7 lib/stellar/account_flags.rb
stellar-base-0.0.6 lib/stellar/account_flags.rb
stellar-base-0.0.5 lib/stellar/account_flags.rb
stellar-base-0.0.4 lib/stellar/account_flags.rb
stellar-base-0.0.3 lib/stellar/account_flags.rb