Class: Rafflesia::FoldIndexSource
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexSource
- Defined in:
- lib/rafflesia/proteins/fold_index_source.rb
Constant Summary collapse
- HASH_ATTRS =
{ content_type: :content_type, file_name: :file_name, format: :format, object: :object, sha256: :sha_256, size_bytes: :size_bytes, source_id: :source_id, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#format ⇒ Object
Returns the value of attribute format.
-
#object ⇒ Object
Returns the value of attribute object.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
-
#source_id ⇒ Object
Returns the value of attribute source_id.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexSource
constructor
A new instance of FoldIndexSource.
Constructor Details
#initialize(json) ⇒ FoldIndexSource
Returns a new instance of FoldIndexSource.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @content_type = hash[:content_type] @file_name = hash[:file_name] @format = hash[:format] @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @sha_256 = hash[:sha256] @size_bytes = hash[:size_bytes] @source_id = hash[:source_id] @structure_id = hash[:structure_id] end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def content_type @content_type end |
#file_name ⇒ Object
Returns the value of attribute file_name.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def file_name @file_name end |
#format ⇒ Object
Returns the value of attribute format.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def format @format end |
#object ⇒ Object
Returns the value of attribute object.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def object @object end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def size_bytes @size_bytes end |
#source_id ⇒ Object
Returns the value of attribute source_id.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def source_id @source_id end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_source.rb', line 19 def structure_id @structure_id end |