Class: Rafflesia::SequenceCandidateBenchmarkData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  benchmark_object: :benchmark_object,
  engine: :engine,
  max_hits: :max_hits,
  namespace: :namespace,
  object_store_root: :object_store_root,
  query_mode: :query_mode,
  rows: :rows,
  summary: :summary,
  timeout_ms: :timeout_ms
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SequenceCandidateBenchmarkData

Returns a new instance of SequenceCandidateBenchmarkData.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 33

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @benchmark_object = hash[:benchmark_object] ? Rafflesia::ObjectRef.new(hash[:benchmark_object]) : nil
  @engine = hash[:engine]
  @max_hits = hash[:max_hits]
  @namespace = hash[:namespace]
  @object_store_root = hash[:object_store_root]
  @query_mode = hash[:query_mode]
  @rows = (hash[:rows] || []).map { |item| item ? Rafflesia::SequenceCandidateBenchmarkQueryResult.new(item) : nil }
  @summary = hash[:summary] ? Rafflesia::SequenceCandidateBenchmarkSummary.new(hash[:summary]) : nil
  @timeout_ms = hash[:timeout_ms]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def backend
  @backend
end

#benchmark_objectObject

Returns the value of attribute benchmark_object.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def benchmark_object
  @benchmark_object
end

#engineObject

Returns the value of attribute engine.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def engine
  @engine
end

#max_hitsObject

Returns the value of attribute max_hits.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def max_hits
  @max_hits
end

#namespaceObject

Returns the value of attribute namespace.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def namespace
  @namespace
end

#object_store_rootObject

Returns the value of attribute object_store_root.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def object_store_root
  @object_store_root
end

#query_modeObject

Returns the value of attribute query_mode.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def query_mode
  @query_mode
end

#rowsObject

Returns the value of attribute rows.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def rows
  @rows
end

#summaryObject

Returns the value of attribute summary.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def summary
  @summary
end

#timeout_msObject

Returns the value of attribute timeout_ms.



21
22
23
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_data.rb', line 21

def timeout_ms
  @timeout_ms
end