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



29
30
# File 'lib/cinch/dcc/dccable_object.rb', line 29

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



15
16
# File 'lib/cinch/dcc/dccable_object.rb', line 15

def read(number)
end

#seek(position)

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



22
23
# File 'lib/cinch/dcc/dccable_object.rb', line 22

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



33
34
# File 'lib/cinch/dcc/dccable_object.rb', line 33

def size
end