Method: Steem::Marshal#initialize
- Defined in:
- lib/steem/marshal.rb
#initialize(options = {}) ⇒ Marshal
Returns a new instance of Marshal.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/steem/marshal.rb', line 13 def initialize( = {}) @bytes = if !!(hex = [:hex]) unhexlify hex else [:bytes] end @chain = [:chain] || :steem @prefix ||= case @chain when :steem then NETWORKS_STEEM_ADDRESS_PREFIX when :test then NETWORKS_TEST_ADDRESS_PREFIX else; raise UnsupportedChainError, "Unsupported chain: #{@chain}" end @cursor = 0 end |