Class: Rafflesia::VariantQueryData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/genomes/variant_query_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  command: :command,
  file: :file,
  is_executed: :is_executed,
  record_count: :record_count,
  records: :records,
  region: :region
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ VariantQueryData

Returns a new instance of VariantQueryData.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @command = (hash[:command] || [])
  @file = hash[:file]
  @is_executed = hash[:is_executed]
  @record_count = hash[:record_count]
  @records = (hash[:records] || []).map { |item| item ? Rafflesia::VariantQueryRecord.new(item) : nil }
  @region = hash[:region]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def backend
  @backend
end

#commandObject

Returns the value of attribute command.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def command
  @command
end

#fileObject

Returns the value of attribute file.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def file
  @file
end

#is_executedObject

Returns the value of attribute is_executed.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def is_executed
  @is_executed
end

#record_countObject

Returns the value of attribute record_count.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def record_count
  @record_count
end

#recordsObject

Returns the value of attribute records.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def records
  @records
end

#regionObject

Returns the value of attribute region.



18
19
20
# File 'lib/rafflesia/genomes/variant_query_data.rb', line 18

def region
  @region
end