Class: Nis::Struct::Block
- Inherits:
-
Object
- Object
- Nis::Struct::Block
- Includes:
- Util::Assignable
- Defined in:
- lib/nis/struct/block.rb
Overview
Instance Attribute Summary collapse
-
#height ⇒ Integer
The current value of height.
-
#prevBlockHash ⇒ String
(also: #prev_block_hash)
The current value of prevBlockHash.
-
#signature ⇒ String
The current value of signature.
-
#signer ⇒ String
The current value of signer.
-
#timeStamp ⇒ Integer
(also: #timestamp)
The current value of timeStamp.
-
#transactions ⇒ Array <Nis::Struct::transaction>
The current value of transactions.
-
#type ⇒ Integer
The current value of type.
-
#version ⇒ Integer
The current value of version.
Class Method Summary collapse
Methods included from Util::Assignable
#[], #initialize, #to_hash, #to_json
Instance Attribute Details
#height ⇒ Integer
Returns the current value of height.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def height @height end |
#prevBlockHash ⇒ String Also known as: prev_block_hash
Returns the current value of prevBlockHash.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def prevBlockHash @prevBlockHash end |
#signature ⇒ String
Returns the current value of signature.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def signature @signature end |
#signer ⇒ String
Returns the current value of signer.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def signer @signer end |
#timeStamp ⇒ Integer Also known as: timestamp
Returns the current value of timeStamp.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def timeStamp @timeStamp end |
#transactions ⇒ Array <Nis::Struct::transaction>
Returns the current value of transactions.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def transactions @transactions end |
#type ⇒ Integer
Returns the current value of type.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def type @type end |
#version ⇒ Integer
Returns the current value of version.
11 12 13 |
# File 'lib/nis/struct/block.rb', line 11 def version @version end |
Class Method Details
.build(attrs) ⇒ Object
20 21 22 23 |
# File 'lib/nis/struct/block.rb', line 20 def self.build(attrs) attrs[:transactions] = attrs[:transactions].map { |tx| Transaction.build(tx) } new(attrs) end |