Class: Rafflesia::CacheStatusFile
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheStatusFile
- Defined in:
- lib/rafflesia/cache/cache_status_file.rb
Constant Summary collapse
- HASH_ATTRS =
{ is_eligible: :is_eligible, is_pinned: :is_pinned, mod_time_unix: :mod_time_unix, path: :path, rel_path: :rel_path, size_bytes: :size_bytes }.freeze
Instance Attribute Summary collapse
-
#is_eligible ⇒ Object
Returns the value of attribute is_eligible.
-
#is_pinned ⇒ Object
Returns the value of attribute is_pinned.
-
#mod_time_unix ⇒ Object
Returns the value of attribute mod_time_unix.
-
#path ⇒ Object
Returns the value of attribute path.
-
#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) ⇒ CacheStatusFile
constructor
A new instance of CacheStatusFile.
Constructor Details
#initialize(json) ⇒ CacheStatusFile
Returns a new instance of CacheStatusFile.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @is_eligible = hash[:is_eligible] @is_pinned = hash[:is_pinned] @mod_time_unix = hash[:mod_time_unix] @path = hash[:path] @rel_path = hash[:rel_path] @size_bytes = hash[:size_bytes] end |
Instance Attribute Details
#is_eligible ⇒ Object
Returns the value of attribute is_eligible.
17 18 19 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 17 def is_eligible @is_eligible end |
#is_pinned ⇒ Object
Returns the value of attribute is_pinned.
17 18 19 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 17 def is_pinned @is_pinned end |
#mod_time_unix ⇒ Object
Returns the value of attribute mod_time_unix.
17 18 19 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 17 def mod_time_unix @mod_time_unix end |
#path ⇒ Object
Returns the value of attribute path.
17 18 19 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 17 def path @path end |
#rel_path ⇒ Object
Returns the value of attribute rel_path.
17 18 19 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 17 def rel_path @rel_path end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
17 18 19 |
# File 'lib/rafflesia/cache/cache_status_file.rb', line 17 def size_bytes @size_bytes end |