Class: Transformers::HfHub::HfFileMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/transformers/hf_hub/file_download.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commit_hash:, etag:, location:, size:) ⇒ HfFileMetadata

Returns a new instance of HfFileMetadata.



15
16
17
18
19
20
# File 'lib/transformers/hf_hub/file_download.rb', line 15

def initialize(commit_hash:, etag:, location:, size:)
  @commit_hash = commit_hash
  @etag = etag
  @location = location
  @size = size
end

Instance Attribute Details

#commit_hashObject (readonly)

Returns the value of attribute commit_hash.



13
14
15
# File 'lib/transformers/hf_hub/file_download.rb', line 13

def commit_hash
  @commit_hash
end

#etagObject (readonly)

Returns the value of attribute etag.



13
14
15
# File 'lib/transformers/hf_hub/file_download.rb', line 13

def etag
  @etag
end

#locationObject (readonly)

Returns the value of attribute location.



13
14
15
# File 'lib/transformers/hf_hub/file_download.rb', line 13

def location
  @location
end

#sizeObject (readonly)

Returns the value of attribute size.



13
14
15
# File 'lib/transformers/hf_hub/file_download.rb', line 13

def size
  @size
end