class Nem::Model::Block
Attributes
height[R]
prev_block_hash[R]
signature[R]
signer[R]
timestamp[R]
transactions[R]
type[R]
version[R]
Public Class Methods
new_from_block(hash)
click to toggle source
# File lib/nem/model/block.rb, line 15 def self.new_from_block(hash) txes = hash[:transactions].map do |tx| Transaction.new_from_account_transaction(tx) end new( timestamp: hash[:timeStamp], signature: hash[:signature], prev_block_hash: hash[:prevBlockHash][:data], type: hash[:type], transactions: txes, version: hash[:version], signer: hash[:signer], height: hash[:height] ) end