class IPFS::Content::Node

Attributes

hashcode[R]

Public Class Methods

new(hashcode:, links:) click to toggle source
# File lib/ipfs/content/node.rb, line 8
def initialize(hashcode:, links:)
  @hashcode = hashcode
  @links = links
end
parse_array(array) click to toggle source
# File lib/ipfs/content/node.rb, line 13
def self.parse_array(array)
  array.map do |item|
    new(hashcode: item['Hash'], links: Link.parse_array(item['Links']))
  end
end