Class: Skyfall::Firehose::CommitMessage
- Inherits:
-
Message
- Object
- Message
- Skyfall::Firehose::CommitMessage
show all
- Defined in:
- lib/skyfall/firehose/commit_message.rb
Instance Attribute Summary
Attributes inherited from Message
#data_object, #did, #seq, #type, #type_object
Instance Method Summary
collapse
Methods inherited from Message
#initialize, #inspect, #inspectable_variables, new, #time
Instance Method Details
#blocks ⇒ Object
17
18
19
|
# File 'lib/skyfall/firehose/commit_message.rb', line 17
def blocks
@blocks ||= CarArchive.new(@data_object['blocks'])
end
|
#commit ⇒ Object
8
9
10
|
# File 'lib/skyfall/firehose/commit_message.rb', line 8
def commit
@commit ||= @data_object['commit'] && CID.from_cbor_tag(@data_object['commit'])
end
|
#operations ⇒ Object
21
22
23
|
# File 'lib/skyfall/firehose/commit_message.rb', line 21
def operations
@operations ||= @data_object['ops'].map { |op| Firehose::Operation.new(self, op) }
end
|
#prev ⇒ Object
12
13
14
15
|
# File 'lib/skyfall/firehose/commit_message.rb', line 12
def prev
STDERR.puts "Warning: `prev` property has been deprecated and will be removed in a future version."
@prev ||= @data_object['prev'] && CID.from_cbor_tag(@data_object['prev'])
end
|
#raw_record_for_operation(op) ⇒ Object
25
26
27
|
# File 'lib/skyfall/firehose/commit_message.rb', line 25
def raw_record_for_operation(op)
op.cid && blocks.section_with_cid(op.cid)
end
|