Class: Rafflesia::FoldSearchShardData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_search_shard_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  db_prefix: :db_prefix,
  elapsed_ms: :elapsed_ms,
  foldseek_run: :foldseek_run,
  hit_count: :hit_count,
  raw_output_object: :raw_output_object,
  shard_id: :shard_id,
  warning_count: :warning_count,
  was_executed: :was_executed
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldSearchShardData

Returns a new instance of FoldSearchShardData.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @db_prefix = hash[:db_prefix]
  @elapsed_ms = hash[:elapsed_ms]
  @foldseek_run = hash[:foldseek_run] ? Rafflesia::FoldseekRunData.new(hash[:foldseek_run]) : nil
  @hit_count = hash[:hit_count]
  @raw_output_object = hash[:raw_output_object] ? Rafflesia::ObjectRef.new(hash[:raw_output_object]) : nil
  @shard_id = hash[:shard_id]
  @warning_count = hash[:warning_count]
  @was_executed = hash[:was_executed]
end

Instance Attribute Details

#db_prefixObject

Returns the value of attribute db_prefix.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def db_prefix
  @db_prefix
end

#elapsed_msObject

Returns the value of attribute elapsed_ms.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def elapsed_ms
  @elapsed_ms
end

#foldseek_runObject

Returns the value of attribute foldseek_run.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def foldseek_run
  @foldseek_run
end

#hit_countObject

Returns the value of attribute hit_count.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def hit_count
  @hit_count
end

#raw_output_objectObject

Returns the value of attribute raw_output_object.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def raw_output_object
  @raw_output_object
end

#shard_idObject

Returns the value of attribute shard_id.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def shard_id
  @shard_id
end

#warning_countObject

Returns the value of attribute warning_count.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def warning_count
  @warning_count
end

#was_executedObject

Returns the value of attribute was_executed.



19
20
21
# File 'lib/rafflesia/proteins/fold_search_shard_data.rb', line 19

def was_executed
  @was_executed
end