Class: LeoManager::AssignedFile
- Inherits:
-
Object
- Object
- LeoManager::AssignedFile
- Defined in:
- lib/leo_manager_models.rb
Overview
Assigned file info Model
Instance Attribute Summary collapse
-
#checksum ⇒ Object
readonly
Returns the value of attribute checksum.
-
#clock ⇒ Object
readonly
Returns the value of attribute clock.
-
#delete ⇒ Object
readonly
Returns the value of attribute delete.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#num_of_chunks ⇒ Object
readonly
Returns the value of attribute num_of_chunks.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#vnode_id ⇒ Object
readonly
Returns the value of attribute vnode_id.
Instance Method Summary collapse
-
#initialize(h) ⇒ AssignedFile
constructor
A new instance of AssignedFile.
Constructor Details
#initialize(h) ⇒ AssignedFile
Returns a new instance of AssignedFile.
197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/leo_manager_models.rb', line 197 def initialize(h) @node = h[:node] @vnode_id = h[:vnode_id] @size = h[:size] @clock = h[:clock] @checksum = h[:checksum] = h[:timestamp] @timestamp = .empty? ? : Time.parse() @delete = h[:delete] != 0 # bool @num_of_chunks = h[:num_of_chunks] end |
Instance Attribute Details
#checksum ⇒ Object (readonly)
Returns the value of attribute checksum.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def checksum @checksum end |
#clock ⇒ Object (readonly)
Returns the value of attribute clock.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def clock @clock end |
#delete ⇒ Object (readonly)
Returns the value of attribute delete.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def delete @delete end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def node @node end |
#num_of_chunks ⇒ Object (readonly)
Returns the value of attribute num_of_chunks.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def num_of_chunks @num_of_chunks end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def size @size end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def @timestamp end |
#vnode_id ⇒ Object (readonly)
Returns the value of attribute vnode_id.
195 196 197 |
# File 'lib/leo_manager_models.rb', line 195 def vnode_id @vnode_id end |