Class: Rafflesia::CacheExplainData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheExplainData
- Defined in:
- lib/rafflesia/cache/cache_explain_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifact_refs: :artifact_refs, cache_hit_would_reuse: :cache_hit_would_reuse, cache_key: :cache_key, cache_record_path: :cache_record_path, cache_record_version: :cache_record_version, found: :found, manifest: :manifest, manifest_object: :manifest_object, materialization: :materialization, namespace: :namespace, operation_id: :operation_id, parameters: :parameters, reused_object_ids: :reused_object_ids, tool_versions: :tool_versions }.freeze
Instance Attribute Summary collapse
-
#artifact_refs ⇒ Object
Returns the value of attribute artifact_refs.
-
#cache_hit_would_reuse ⇒ Object
Returns the value of attribute cache_hit_would_reuse.
-
#cache_key ⇒ Object
Returns the value of attribute cache_key.
-
#cache_record_path ⇒ Object
Returns the value of attribute cache_record_path.
-
#cache_record_version ⇒ Object
Returns the value of attribute cache_record_version.
-
#found ⇒ Object
Returns the value of attribute found.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
-
#materialization ⇒ Object
Returns the value of attribute materialization.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#operation_id ⇒ Object
Returns the value of attribute operation_id.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#reused_object_ids ⇒ Object
Returns the value of attribute reused_object_ids.
-
#tool_versions ⇒ Object
Returns the value of attribute tool_versions.
Instance Method Summary collapse
-
#initialize(json) ⇒ CacheExplainData
constructor
A new instance of CacheExplainData.
Constructor Details
#initialize(json) ⇒ CacheExplainData
Returns a new instance of CacheExplainData.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @artifact_refs = (hash[:artifact_refs] || []).map { |item| item ? Rafflesia::ObjectRef.new(item) : nil } @cache_hit_would_reuse = hash[:cache_hit_would_reuse] @cache_key = hash[:cache_key] @cache_record_path = hash[:cache_record_path] @cache_record_version = hash[:cache_record_version] @found = hash[:found] @manifest = hash[:manifest] ? Rafflesia::MsaArtifactManifest.new(hash[:manifest]) : nil @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil @materialization = hash[:materialization] ? Rafflesia::CacheMaterializationExplanation.new(hash[:materialization]) : nil @namespace = hash[:namespace] @operation_id = hash[:operation_id] @parameters = hash[:parameters] || {} @reused_object_ids = (hash[:reused_object_ids] || []) @tool_versions = (hash[:tool_versions] || []).map { |item| item ? Rafflesia::ToolVersion.new(item) : nil } end |
Instance Attribute Details
#artifact_refs ⇒ Object
Returns the value of attribute artifact_refs.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def artifact_refs @artifact_refs end |
#cache_hit_would_reuse ⇒ Object
Returns the value of attribute cache_hit_would_reuse.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def cache_hit_would_reuse @cache_hit_would_reuse end |
#cache_key ⇒ Object
Returns the value of attribute cache_key.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def cache_key @cache_key end |
#cache_record_path ⇒ Object
Returns the value of attribute cache_record_path.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def cache_record_path @cache_record_path end |
#cache_record_version ⇒ Object
Returns the value of attribute cache_record_version.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def cache_record_version @cache_record_version end |
#found ⇒ Object
Returns the value of attribute found.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def found @found end |
#manifest ⇒ Object
Returns the value of attribute manifest.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def manifest @manifest end |
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def manifest_object @manifest_object end |
#materialization ⇒ Object
Returns the value of attribute materialization.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def materialization @materialization end |
#namespace ⇒ Object
Returns the value of attribute namespace.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def namespace @namespace end |
#operation_id ⇒ Object
Returns the value of attribute operation_id.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def operation_id @operation_id end |
#parameters ⇒ Object
Returns the value of attribute parameters.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def parameters @parameters end |
#reused_object_ids ⇒ Object
Returns the value of attribute reused_object_ids.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def reused_object_ids @reused_object_ids end |
#tool_versions ⇒ Object
Returns the value of attribute tool_versions.
25 26 27 |
# File 'lib/rafflesia/cache/cache_explain_data.rb', line 25 def tool_versions @tool_versions end |