Class: Transmission::Torrent::FileInfo
- Inherits:
-
Object
- Object
- Transmission::Torrent::FileInfo
- Defined in:
- ext/r_transmission.c,
lib/transmission.rb,
ext/r_transmission.c
Overview
Summary
The FileInfo class containts the information about a file which is part of this torrent.
Instance Method Summary collapse
-
#name ⇒ String
Returns the name of the file.
-
#size ⇒ Integer
Returns the size of the file.
-
#name ⇒ String
Returns the name of the file.
-
#size ⇒ Integer
Returns the size of the file.
- #to_s ⇒ Object
Instance Method Details
#name ⇒ String
Returns the name of the file.
752 753 754 755 756 757 758 |
# File 'ext/r_transmission.c', line 752
static VALUE
r_file_info_name(VALUE self)
{
tr_file_t *file;
Data_Get_Struct(self, tr_file_t, file);
return rb_str_new2(file->name);
}
|
#size ⇒ Integer
Returns the size of the file.
766 767 768 769 770 771 772 |
# File 'ext/r_transmission.c', line 766
static VALUE
r_file_info_size(VALUE self)
{
tr_file_t *file;
Data_Get_Struct(self, tr_file_t, file);
return INT2FIX(file->length);
}
|
#name ⇒ String
Returns the name of the file.
752 753 754 755 756 757 758 |
# File 'ext/r_transmission.c', line 752
static VALUE
r_file_info_name(VALUE self)
{
tr_file_t *file;
Data_Get_Struct(self, tr_file_t, file);
return rb_str_new2(file->name);
}
|
#size ⇒ Integer
Returns the size of the file.
766 767 768 769 770 771 772 |
# File 'ext/r_transmission.c', line 766
static VALUE
r_file_info_size(VALUE self)
{
tr_file_t *file;
Data_Get_Struct(self, tr_file_t, file);
return INT2FIX(file->length);
}
|
#to_s ⇒ Object
70 71 72 |
# File 'lib/transmission.rb', line 70 def to_s "FileInfo{name: %s, size: %d}" % [name, size] end |