Class: FlowClient::CollectionGuarantee

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_client/collection.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCollectionGuarantee

Returns a new instance of CollectionGuarantee.



23
24
25
26
# File 'lib/flow_client/collection.rb', line 23

def initialize
  @collection_id = nil
  @signatures = []
end

Instance Attribute Details

#collection_idObject

Returns the value of attribute collection_id.



21
22
23
# File 'lib/flow_client/collection.rb', line 21

def collection_id
  @collection_id
end

#signaturesObject

Returns the value of attribute signatures.



21
22
23
# File 'lib/flow_client/collection.rb', line 21

def signatures
  @signatures
end

Class Method Details

.parse_grpc_type(grpc_type) ⇒ Object



28
29
30
31
32
33
# File 'lib/flow_client/collection.rb', line 28

def self.parse_grpc_type(grpc_type)
  collection_guarantee = CollectionGuarantee.new
  collection_guarantee.collection_id = grpc_type.collection_id.unpack1("H*")
  collection_guarantee.signatures = grpc_type.signatures.to_a.map { |s| s.unpack1("H*") }
  collection_guarantee
end