Method: OpenAssets::Protocol::TransactionOutput#asset_amount

Defined in:
lib/openassets/protocol/transaction_output.rb

#asset_amountObject

calculate asset amount. asset amount is the value obtained by converting the asset quantity to the unit of divisibility that are defined in the Asset definition file.



40
41
42
43
# File 'lib/openassets/protocol/transaction_output.rb', line 40

def asset_amount
  d = divisibility
  d > 0 ? (@asset_quantity.to_f / (10 ** d)).to_f : @asset_quantity
end