Class: Rafflesia::CacheStatusRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheStatusRequest
- Defined in:
- lib/rafflesia/cache/cache_status_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ include_files: :include_files, max_bytes: :max_bytes, max_files: :max_files, namespace: :namespace, older_than_seconds: :older_than_seconds, pinned_paths: :pinned_paths, policy: :policy, target_dir: :target_dir, workload_profile: :workload_profile }.freeze
Instance Attribute Summary collapse
-
#include_files ⇒ Object
Returns the value of attribute include_files.
-
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
-
#max_files ⇒ Object
Returns the value of attribute max_files.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#older_than_seconds ⇒ Object
Returns the value of attribute older_than_seconds.
-
#pinned_paths ⇒ Object
Returns the value of attribute pinned_paths.
-
#policy ⇒ Object
Returns the value of attribute policy.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#workload_profile ⇒ Object
Returns the value of attribute workload_profile.
Instance Method Summary collapse
-
#initialize(json) ⇒ CacheStatusRequest
constructor
A new instance of CacheStatusRequest.
Constructor Details
#initialize(json) ⇒ CacheStatusRequest
Returns a new instance of CacheStatusRequest.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @include_files = hash[:include_files] @max_bytes = hash[:max_bytes] @max_files = hash[:max_files] @namespace = hash[:namespace] @older_than_seconds = hash[:older_than_seconds] @pinned_paths = (hash[:pinned_paths] || []) @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil @target_dir = hash[:target_dir] @workload_profile = hash[:workload_profile] end |
Instance Attribute Details
#include_files ⇒ Object
Returns the value of attribute include_files.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def include_files @include_files end |
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def max_bytes @max_bytes end |
#max_files ⇒ Object
Returns the value of attribute max_files.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def max_files @max_files end |
#namespace ⇒ Object
Returns the value of attribute namespace.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def namespace @namespace end |
#older_than_seconds ⇒ Object
Returns the value of attribute older_than_seconds.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def older_than_seconds @older_than_seconds end |
#pinned_paths ⇒ Object
Returns the value of attribute pinned_paths.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def pinned_paths @pinned_paths end |
#policy ⇒ Object
Returns the value of attribute policy.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def policy @policy end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def target_dir @target_dir end |
#workload_profile ⇒ Object
Returns the value of attribute workload_profile.
20 21 22 |
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20 def workload_profile @workload_profile end |