Class: Rafflesia::SimulationGromacsTextObject

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/simulations/simulation_gromacs_text_object.rb

Constant Summary collapse

HASH_ATTRS =
{
  content_type: :content_type,
  diagnostics: :diagnostics,
  line_count: :line_count,
  object_id: :object_id,
  sha256: :sha_256,
  size_bytes: :size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SimulationGromacsTextObject

Returns a new instance of SimulationGromacsTextObject.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @content_type = hash[:content_type]
  @diagnostics = hash[:diagnostics] ? Rafflesia::ObjectReadDiagnostics.new(hash[:diagnostics]) : nil
  @line_count = hash[:line_count]
  @object_id = hash[:object_id]
  @sha_256 = hash[:sha256]
  @size_bytes = hash[:size_bytes]
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



17
18
19
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 17

def content_type
  @content_type
end

#diagnosticsObject

Returns the value of attribute diagnostics.



17
18
19
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 17

def diagnostics
  @diagnostics
end

#line_countObject

Returns the value of attribute line_count.



17
18
19
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 17

def line_count
  @line_count
end

#object_idObject

Returns the value of attribute object_id.



17
18
19
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 17

def object_id
  @object_id
end

#sha_256Object

Returns the value of attribute sha_256.



17
18
19
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 17

def sha_256
  @sha_256
end

#size_bytesObject

Returns the value of attribute size_bytes.



17
18
19
# File 'lib/rafflesia/simulations/simulation_gromacs_text_object.rb', line 17

def size_bytes
  @size_bytes
end