Class: Rafflesia::CacheEvictedFile
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheEvictedFile
- Defined in:
- lib/rafflesia/cache/cache_evicted_file.rb
Constant Summary collapse
- HASH_ATTRS =
{ mod_time_unix: :mod_time_unix, path: :path, reason: :reason, rel_path: :rel_path, size_bytes: :size_bytes }.freeze
Instance Attribute Summary collapse
-
#mod_time_unix ⇒ Object
Returns the value of attribute mod_time_unix.
-
#path ⇒ Object
Returns the value of attribute path.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#rel_path ⇒ Object
Returns the value of attribute rel_path.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ CacheEvictedFile
constructor
A new instance of CacheEvictedFile.
Constructor Details
#initialize(json) ⇒ CacheEvictedFile
Returns a new instance of CacheEvictedFile.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @mod_time_unix = hash[:mod_time_unix] @path = hash[:path] @reason = hash[:reason] @rel_path = hash[:rel_path] @size_bytes = hash[:size_bytes] end |
Instance Attribute Details
#mod_time_unix ⇒ Object
Returns the value of attribute mod_time_unix.
16 17 18 |
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16 def mod_time_unix @mod_time_unix end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16 def path @path end |
#reason ⇒ Object
Returns the value of attribute reason.
16 17 18 |
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16 def reason @reason end |
#rel_path ⇒ Object
Returns the value of attribute rel_path.
16 17 18 |
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16 def rel_path @rel_path end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
16 17 18 |
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16 def size_bytes @size_bytes end |