Class: LeoFSManager::AssignedFile
- Inherits:
-
Object
- Object
- LeoFSManager::AssignedFile
- Defined in:
- lib/leofs_manager_client/leofs_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.
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 108 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.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def checksum @checksum end |
#clock ⇒ Object (readonly)
Returns the value of attribute clock.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def clock @clock end |
#delete ⇒ Object (readonly)
Returns the value of attribute delete.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def delete @delete end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def node @node end |
#num_of_chunks ⇒ Object (readonly)
Returns the value of attribute num_of_chunks.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def num_of_chunks @num_of_chunks end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def size @size end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def @timestamp end |
#vnode_id ⇒ Object (readonly)
Returns the value of attribute vnode_id.
106 107 108 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 106 def vnode_id @vnode_id end |