Class: LeoManager::AssignedFile

Inherits:
Object
  • Object
show all
Defined in:
lib/leo_manager_models.rb

Overview

Assigned file info Model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ AssignedFile

Returns a new instance of AssignedFile.



158
159
160
161
162
163
164
165
166
167
168
# File 'lib/leo_manager_models.rb', line 158

def initialize(h)
  @node      = h[:node]
  @vnode_id  = h[:vnode_id]
  @size      = h[:size]
  @clock     = h[:clock]
  @checksum  = h[:checksum]
  timestamp = h[:timestamp]
  @timestamp = timestamp.empty? ? timestamp : Time.parse(timestamp)
  @delete    = h[:delete] != 0 # bool
  @num_of_chunks = h[:num_of_chunks]
end

Instance Attribute Details

#checksumObject (readonly)

Returns the value of attribute checksum.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def checksum
  @checksum
end

#clockObject (readonly)

Returns the value of attribute clock.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def clock
  @clock
end

#deleteObject (readonly)

Returns the value of attribute delete.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def delete
  @delete
end

#nodeObject (readonly)

Returns the value of attribute node.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def node
  @node
end

#num_of_chunksObject (readonly)

Returns the value of attribute num_of_chunks.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def num_of_chunks
  @num_of_chunks
end

#sizeObject (readonly)

Returns the value of attribute size.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def size
  @size
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def timestamp
  @timestamp
end

#vnode_idObject (readonly)

Returns the value of attribute vnode_id.



156
157
158
# File 'lib/leo_manager_models.rb', line 156

def vnode_id
  @vnode_id
end