Class: FlowClient::BlockHeader
- Inherits:
-
Object
- Object
- FlowClient::BlockHeader
- Defined in:
- lib/flow_client/block.rb
Overview
Represents a block header
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#id ⇒ Object
Returns the value of attribute id.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BlockHeader
constructor
A new instance of BlockHeader.
Constructor Details
#initialize ⇒ BlockHeader
Returns a new instance of BlockHeader.
71 |
# File 'lib/flow_client/block.rb', line 71 def initialize; end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
69 70 71 |
# File 'lib/flow_client/block.rb', line 69 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
69 70 71 |
# File 'lib/flow_client/block.rb', line 69 def id @id end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
69 70 71 |
# File 'lib/flow_client/block.rb', line 69 def parent_id @parent_id end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
69 70 71 |
# File 'lib/flow_client/block.rb', line 69 def @timestamp end |
Class Method Details
.parse_grpc_type(grpc_type) ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/flow_client/block.rb', line 73 def self.parse_grpc_type(grpc_type) header = BlockHeader.new header.id = grpc_type.id.unpack1("H*") header.height = grpc_type.height header. = FlowClient::Utils.(grpc_type.) header end |