Class: Rafflesia::CryoEmMapData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CryoEmMapData
- Defined in:
- lib/rafflesia/artifacts/cryo_em_map_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ emdb_id: :emdb_id, format: :format, header: :header, map_id: :map_id, metadata: :metadata, object: :object, retrieved_at: :retrieved_at, source: :source, source_url: :source_url }.freeze
Instance Attribute Summary collapse
-
#emdb_id ⇒ Object
Returns the value of attribute emdb_id.
-
#format ⇒ Object
Returns the value of attribute format.
-
#header ⇒ Object
Returns the value of attribute header.
-
#map_id ⇒ Object
Returns the value of attribute map_id.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#object ⇒ Object
Returns the value of attribute object.
-
#retrieved_at ⇒ Object
Returns the value of attribute retrieved_at.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
Instance Method Summary collapse
-
#initialize(json) ⇒ CryoEmMapData
constructor
A new instance of CryoEmMapData.
Constructor Details
#initialize(json) ⇒ CryoEmMapData
Returns a new instance of CryoEmMapData.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @emdb_id = hash[:emdb_id] @format = hash[:format] @header = hash[:header] ? Rafflesia::MrcHeaderMetadata.new(hash[:header]) : nil @map_id = hash[:map_id] @metadata = hash[:metadata] || {} @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @retrieved_at = hash[:retrieved_at] @source = hash[:source] @source_url = hash[:source_url] end |
Instance Attribute Details
#emdb_id ⇒ Object
Returns the value of attribute emdb_id.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def emdb_id @emdb_id end |
#format ⇒ Object
Returns the value of attribute format.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def format @format end |
#header ⇒ Object
Returns the value of attribute header.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def header @header end |
#map_id ⇒ Object
Returns the value of attribute map_id.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def map_id @map_id end |
#metadata ⇒ Object
Returns the value of attribute metadata.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def @metadata end |
#object ⇒ Object
Returns the value of attribute object.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def object @object end |
#retrieved_at ⇒ Object
Returns the value of attribute retrieved_at.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def retrieved_at @retrieved_at end |
#source ⇒ Object
Returns the value of attribute source.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def source @source end |
#source_url ⇒ Object
Returns the value of attribute source_url.
20 21 22 |
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20 def source_url @source_url end |