Sha256: 0d3e8d228d315363527ca961a288359e7ab1f02e27e4c6629dfdf964ec468b46

Contents?: true

Size: 484 Bytes

Versions: 4

Compression:

Stored size: 484 Bytes

Contents

module Sidetree
  module Model
    class Chunk
      attr_reader :chunk_file_uri

      # Initializer
      # @param [String] chunk_file_uri chunk file uri.
      # @raise [Sidetree::Error]
      def initialize(chunk_file_uri)
        unless chunk_file_uri.is_a?(String)
          raise Sidetree::Error, "chunk_file_uri must be String"
        end
        @chunk_file_uri = chunk_file_uri
      end

      def to_h
        { chunkFileUri: chunk_file_uri }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sidetree-0.1.5 lib/sidetree/model/chunk.rb
sidetree-0.1.4 lib/sidetree/model/chunk.rb
sidetree-0.1.3 lib/sidetree/model/chunk.rb
sidetree-0.1.2 lib/sidetree/model/chunk.rb