Class: Ethmo::Block
- Inherits:
-
Hash
- Object
- Hash
- Ethmo::Block
- Defined in:
- lib/ethmo/block.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(hash) ⇒ Block
constructor
A new instance of Block.
- #transactions ⇒ Object
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
#transactions ⇒ Object
10 11 12 13 14 |
# File 'lib/ethmo/block.rb', line 10 def transactions @transactions ||= self['transactions'] .map { |tx| Transaction.new(tx) } end |