Module: DTAS::Source::Common

Included in:
Cmd, File
Defined in:
lib/dtas/source/common.rb

Overview

Copyright (C) 2013-2016 all contributors <[email protected]> License: GPL-3.0+ <www.gnu.org/licenses/gpl-3.0.txt>

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dstObject (readonly)

Returns the value of attribute dst.


5
6
7
# File 'lib/dtas/source/common.rb', line 5

def dst
  @dst
end

#dst_zero_byteObject (readonly)

:nodoc:


4
5
6
# File 'lib/dtas/source/common.rb', line 4

def dst_zero_byte
  @dst_zero_byte
end

#requeuedObject

Returns the value of attribute requeued.


6
7
8
# File 'lib/dtas/source/common.rb', line 6

def requeued
  @requeued
end

Instance Method Details

#dst_assoc(buf) ⇒ Object

buf - a DTAS::Buffer object (pipe)


9
10
11
12
13
# File 'lib/dtas/source/common.rb', line 9

def dst_assoc(buf)
  @dst = buf
  @dst_zero_byte = buf.bytes_xfer + buf.inflight
  @requeued = false
end