Class: Nis::Struct::ExplorerBlockViewModel
- Inherits:
-
Object
- Object
- Nis::Struct::ExplorerBlockViewModel
- Includes:
- Util::Assignable
- Defined in:
- lib/nis/struct/explorer_block_view_model.rb
Overview
Instance Attribute Summary collapse
-
#block ⇒ Nis::Struct::Block
The current value of block.
-
#difficulty ⇒ String
The current value of difficulty.
-
#hash ⇒ String
The current value of hash.
-
#txes ⇒ Array <Nis::Struct::ExplorerTransferViewModel>
The current value of txes.
Class Method Summary collapse
Methods included from Util::Assignable
#[], #initialize, #to_hash, #to_json
Instance Attribute Details
#block ⇒ Nis::Struct::Block
Returns the current value of block.
7 8 9 |
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7 def block @block end |
#difficulty ⇒ String
Returns the current value of difficulty.
7 8 9 |
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7 def difficulty @difficulty end |
#hash ⇒ String
Returns the current value of hash.
7 8 9 |
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7 def hash @hash end |
#txes ⇒ Array <Nis::Struct::ExplorerTransferViewModel>
Returns the current value of txes.
7 8 9 |
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7 def txes @txes end |
Class Method Details
.build(attrs) ⇒ Object
11 12 13 14 15 |
# File 'lib/nis/struct/explorer_block_view_model.rb', line 11 def self.build(attrs) attrs[:txes] = attrs[:txes].map { |tx| ExplorerTransferViewModel.build(tx) } attrs[:block] = Block.build(attrs[:block]) new(attrs) end |