Class: Rafflesia::CacheEvictedFile

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_unixObject

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

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16

def path
  @path
end

#reasonObject

Returns the value of attribute reason.



16
17
18
# File 'lib/rafflesia/cache/cache_evicted_file.rb', line 16

def reason
  @reason
end

#rel_pathObject

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_bytesObject

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