Class: RUTorrent::JobProperties

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (JobProperties) initialize(hash)

Returns a new instance of JobProperties



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rutorrent/job_properties.rb', line 6

def initialize(hash)
  @hash          = hash['hash']
  @trackers      = hash['trackers']
  @ulrate        = hash['ulrate']
  @dlrate        = hash['dlrate']
  @superseed     = hash['superseed']
  @dht           = hash['dht']
  @pex           = hash['pex']
  @seed_override = hash['seed_override']
  @seed_ratio    = hash['seed_ratio']
  @seed_time     = hash['seed_time']
  @ulslots       = hash['ulslots']
end

Instance Attribute Details

- (Object) dht (readonly)

Returns the value of attribute dht



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def dht
  @dht
end

- (Object) dlrate (readonly)

Returns the value of attribute dlrate



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def dlrate
  @dlrate
end

- (Object) hash (readonly)

Returns the value of attribute hash



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def hash
  @hash
end

- (Object) pex (readonly)

Returns the value of attribute pex



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def pex
  @pex
end

- (Object) seed_override (readonly)

Returns the value of attribute seed_override



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def seed_override
  @seed_override
end

- (Object) seed_ratio (readonly)

Returns the value of attribute seed_ratio



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def seed_ratio
  @seed_ratio
end

- (Object) seed_time (readonly)

Returns the value of attribute seed_time



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def seed_time
  @seed_time
end

- (Object) superseed (readonly)

Returns the value of attribute superseed



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def superseed
  @superseed
end

- (Object) trackers (readonly)

Returns the value of attribute trackers



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def trackers
  @trackers
end

- (Object) ulrate (readonly)

Returns the value of attribute ulrate



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def ulrate
  @ulrate
end

- (Object) ulslots (readonly)

Returns the value of attribute ulslots



3
4
5
# File 'lib/rutorrent/job_properties.rb', line 3

def ulslots
  @ulslots
end

Instance Method Details

- (Boolean) dht?

Returns:

  • (Boolean)


24
25
26
# File 'lib/rutorrent/job_properties.rb', line 24

def dht?
  @dht == 1
end

- (Boolean) pex?

Returns:

  • (Boolean)


28
29
30
# File 'lib/rutorrent/job_properties.rb', line 28

def pex?
  @pex == 1
end

- (Boolean) seed_override?

Returns:

  • (Boolean)


32
33
34
# File 'lib/rutorrent/job_properties.rb', line 32

def seed_override?
  @seed_override == 1
end

- (Boolean) superseed?

Returns:

  • (Boolean)


20
21
22
# File 'lib/rutorrent/job_properties.rb', line 20

def superseed?
  @superseed == 1
end