Module: Cinch::DCC::DCCableObject Abstract

Defined in:
lib/cinch/dcc/dccable_object.rb

Overview

This module is abstract.
Note:

‘File` conforms to this interface.

This module describes the required interface for objects that should be sendable via DCC.

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#pathString

Note:

This is only required if calling User#dcc_send with only one argument

Returns A string representing the object’s path or name.

Returns:

  • (String)

    A string representing the object’s path or name.

Since:

  • 2.0.0



31
32
# File 'lib/cinch/dcc/dccable_object.rb', line 31

def path
end

#read(number) ⇒ String?

Return the next ‘number` bytes of the object.

Parameters:

  • number (Integer)

    Read ‘number` bytes at most

Returns:

  • (String)

    The read data

  • (nil)

    If no more data can be read

Since:

  • 2.0.0



17
18
# File 'lib/cinch/dcc/dccable_object.rb', line 17

def read(number)
end

#seek(position) ⇒ void

This method returns an undefined value.

Seek to a specific position.

Parameters:

  • position (Integer)

    The position in bytes to seek to

Since:

  • 2.0.0



24
25
# File 'lib/cinch/dcc/dccable_object.rb', line 24

def seek(position)
end

#sizeInteger

Returns The total size of the data, in bytes.

Returns:

  • (Integer)

    The total size of the data, in bytes.

Since:

  • 2.0.0



35
36
# File 'lib/cinch/dcc/dccable_object.rb', line 35

def size
end