Class: Ethmo::Block

Inherits:
Hash
  • Object
show all
Defined in:
lib/ethmo/block.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Block

Returns a new instance of Block.



6
7
8
# File 'lib/ethmo/block.rb', line 6

def initialize(hash)
  merge! Client.block_from(hash, true).dig('result')
end

Instance Method Details

#transactionsObject



10
11
12
13
14
# File 'lib/ethmo/block.rb', line 10

def transactions
  @transactions ||=
    self['transactions']
    .map { |tx| Transaction.new(tx) }
end