Class: Rafflesia::ArchiveMemberRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ArchiveMemberRecord
- Defined in:
- lib/rafflesia/artifacts/archive_member_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ compressed_size_bytes: :compressed_size_bytes, crc32: :crc_32, extension: :extension, inferred_kind: :inferred_kind, is_dir: :is_dir, message: :message, modified_at: :modified_at, name: :name, object: :object, path: :path, sha256: :sha_256, size_bytes: :size_bytes, status: :status }.freeze
Instance Attribute Summary collapse
-
#compressed_size_bytes ⇒ Object
Returns the value of attribute compressed_size_bytes.
-
#crc_32 ⇒ Object
Returns the value of attribute crc_32.
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#inferred_kind ⇒ Object
Returns the value of attribute inferred_kind.
-
#is_dir ⇒ Object
Returns the value of attribute is_dir.
-
#message ⇒ Object
Returns the value of attribute message.
-
#modified_at ⇒ Object
Returns the value of attribute modified_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#path ⇒ Object
Returns the value of attribute path.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(json) ⇒ ArchiveMemberRecord
constructor
A new instance of ArchiveMemberRecord.
Constructor Details
#initialize(json) ⇒ ArchiveMemberRecord
Returns a new instance of ArchiveMemberRecord.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 39 def initialize(json) super() hash = self.class.normalize(json) @compressed_size_bytes = hash[:compressed_size_bytes] @crc_32 = hash[:crc32] @extension = hash[:extension] @inferred_kind = hash[:inferred_kind] @is_dir = hash[:is_dir] @message = hash[:message] @modified_at = hash[:modified_at] @name = hash[:name] @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @path = hash[:path] @sha_256 = hash[:sha256] @size_bytes = hash[:size_bytes] @status = hash[:status] end |
Instance Attribute Details
#compressed_size_bytes ⇒ Object
Returns the value of attribute compressed_size_bytes.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def compressed_size_bytes @compressed_size_bytes end |
#crc_32 ⇒ Object
Returns the value of attribute crc_32.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def crc_32 @crc_32 end |
#extension ⇒ Object
Returns the value of attribute extension.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def extension @extension end |
#inferred_kind ⇒ Object
Returns the value of attribute inferred_kind.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def inferred_kind @inferred_kind end |
#is_dir ⇒ Object
Returns the value of attribute is_dir.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def is_dir @is_dir end |
#message ⇒ Object
Returns the value of attribute message.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def @message end |
#modified_at ⇒ Object
Returns the value of attribute modified_at.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def modified_at @modified_at end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def object @object end |
#path ⇒ Object
Returns the value of attribute path.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def path @path end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def size_bytes @size_bytes end |
#status ⇒ Object
Returns the value of attribute status.
24 25 26 |
# File 'lib/rafflesia/artifacts/archive_member_record.rb', line 24 def status @status end |