Class: Rafflesia::HomologyQueryContextMeasurement
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::HomologyQueryContextMeasurement
- Defined in:
- lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb
Constant Summary collapse
- HASH_ATTRS =
{ cost: :cost, coverage: :coverage, database_id: :database_id, database_release_id: :database_release_id, execution_failure: :execution_failure, homology_search_id: :homology_search_id, object: :object, observation_status: :observation_status, query_context: :query_context, resolved_parameters: :resolved_parameters, search_provenance: :search_provenance, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#coverage ⇒ Object
Returns the value of attribute coverage.
-
#database_id ⇒ Object
Returns the value of attribute database_id.
-
#database_release_id ⇒ Object
Returns the value of attribute database_release_id.
-
#execution_failure ⇒ Object
Returns the value of attribute execution_failure.
-
#homology_search_id ⇒ Object
Returns the value of attribute homology_search_id.
-
#object ⇒ Object
Returns the value of attribute object.
-
#observation_status ⇒ Object
Returns the value of attribute observation_status.
-
#query_context ⇒ Object
Returns the value of attribute query_context.
-
#resolved_parameters ⇒ Object
Returns the value of attribute resolved_parameters.
-
#search_provenance ⇒ Object
Returns the value of attribute search_provenance.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ HomologyQueryContextMeasurement
constructor
A new instance of HomologyQueryContextMeasurement.
Constructor Details
#initialize(json) ⇒ HomologyQueryContextMeasurement
Returns a new instance of HomologyQueryContextMeasurement.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 37 def initialize(json) super() hash = self.class.normalize(json) @cost = hash[:cost] @coverage = hash[:coverage] @database_id = hash[:database_id] @database_release_id = hash[:database_release_id] @execution_failure = hash[:execution_failure] ? Rafflesia::HomologyQueryContextExecutionFailure.new(hash[:execution_failure]) : nil @homology_search_id = hash[:homology_search_id] @object = hash[:object] @observation_status = hash[:observation_status] @query_context = hash[:query_context] @resolved_parameters = hash[:resolved_parameters] @search_provenance = hash[:search_provenance] @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } end |
Instance Attribute Details
#cost ⇒ Object
Returns the value of attribute cost.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def cost @cost end |
#coverage ⇒ Object
Returns the value of attribute coverage.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def coverage @coverage end |
#database_id ⇒ Object
Returns the value of attribute database_id.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def database_id @database_id end |
#database_release_id ⇒ Object
Returns the value of attribute database_release_id.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def database_release_id @database_release_id end |
#execution_failure ⇒ Object
Returns the value of attribute execution_failure.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def execution_failure @execution_failure end |
#homology_search_id ⇒ Object
Returns the value of attribute homology_search_id.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def homology_search_id @homology_search_id end |
#object ⇒ Object
Returns the value of attribute object.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def object @object end |
#observation_status ⇒ Object
Returns the value of attribute observation_status.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def observation_status @observation_status end |
#query_context ⇒ Object
Returns the value of attribute query_context.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def query_context @query_context end |
#resolved_parameters ⇒ Object
Returns the value of attribute resolved_parameters.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def resolved_parameters @resolved_parameters end |
#search_provenance ⇒ Object
Returns the value of attribute search_provenance.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def search_provenance @search_provenance end |
#warnings ⇒ Object
Returns the value of attribute warnings.
23 24 25 |
# File 'lib/rafflesia/homology_query_context_measurements/homology_query_context_measurement.rb', line 23 def warnings @warnings end |