Module: Beowulf::OperationTypes
- Included in:
- Operation
- Defined in:
- lib/beowulf/operation_types.rb
Constant Summary collapse
- TYPES =
{ transfer: { amount: Type::Amount, fee: Type::Amount }, transfer_to_vesting: { amount: Type::Amount }, withdraw_vesting: { vesting_shares: Type::Amount }, account_create: { fee: Type::Amount, owner: Type::Authority }, account_update: { owner: Type::AuthorityUpdate, fee: Type::Amount } }
Instance Method Summary collapse
Instance Method Details
#type(key, param, value) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/beowulf/operation_types.rb', line 24 def type(key, param, value) return if value.nil? t = TYPES[key] or return value p = t[param] or return value p.new(value) end |