Class: Nis::Struct::ExplorerBlockViewModel

Inherits:
Object
  • Object
show all
Includes:
Util::Assignable
Defined in:
lib/nis/struct/explorer_block_view_model.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Util::Assignable

#[], #initialize, #to_hash, #to_json

Instance Attribute Details

#blockNis::Struct::Block


7
8
9
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7

def block
  @block
end

#difficultyString


7
8
9
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7

def difficulty
  @difficulty
end

#hashString


7
8
9
# File 'lib/nis/struct/explorer_block_view_model.rb', line 7

def hash
  @hash
end

#txesArray <Nis::Struct::ExplorerTransferViewModel>


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