Class: Rafflesia::CorpuReleaseExactRerankData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  binary_path: :binary_path,
  commands: :commands,
  rank_key: :rank_key,
  requested_count: :requested_count,
  reranked_count: :reranked_count,
  skipped_ids: :skipped_ids,
  tool_name: :tool_name,
  tool_version: :tool_version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CorpuReleaseExactRerankData

Returns a new instance of CorpuReleaseExactRerankData.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @binary_path = hash[:binary_path]
  @commands = (hash[:commands] || []).map { |item| (item || []) }
  @rank_key = hash[:rank_key]
  @requested_count = hash[:requested_count]
  @reranked_count = hash[:reranked_count]
  @skipped_ids = (hash[:skipped_ids] || [])
  @tool_name = hash[:tool_name]
  @tool_version = hash[:tool_version]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def backend
  @backend
end

#binary_pathObject

Returns the value of attribute binary_path.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def binary_path
  @binary_path
end

#commandsObject

Returns the value of attribute commands.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def commands
  @commands
end

#rank_keyObject

Returns the value of attribute rank_key.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def rank_key
  @rank_key
end

#requested_countObject

Returns the value of attribute requested_count.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def requested_count
  @requested_count
end

#reranked_countObject

Returns the value of attribute reranked_count.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def reranked_count
  @reranked_count
end

#skipped_idsObject

Returns the value of attribute skipped_ids.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def skipped_ids
  @skipped_ids
end

#tool_nameObject

Returns the value of attribute tool_name.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def tool_name
  @tool_name
end

#tool_versionObject

Returns the value of attribute tool_version.



20
21
22
# File 'lib/rafflesia/datasets/corpu_release_exact_rerank_data.rb', line 20

def tool_version
  @tool_version
end