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

Returns the current value of block.

Returns:



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

def block
  @block
end

#difficultyString

Returns the current value of difficulty.

Returns:

  • (String)

    the current value of difficulty



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

def difficulty
  @difficulty
end

#hashString

Returns the current value of hash.

Returns:

  • (String)

    the current value of hash



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

def hash
  @hash
end

#txesArray <Nis::Struct::ExplorerTransferViewModel>

Returns the current value of txes.

Returns:



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