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

#initialize(hash) ⇒ 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

#dhtObject (readonly)

Returns the value of attribute dht


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

def dht
  @dht
end

#dlrateObject (readonly)

Returns the value of attribute dlrate


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

def dlrate
  @dlrate
end

#hashObject (readonly)

Returns the value of attribute hash


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

def hash
  @hash
end

#pexObject (readonly)

Returns the value of attribute pex


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

def pex
  @pex
end

#seed_overrideObject (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

#seed_ratioObject (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

#seed_timeObject (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

#superseedObject (readonly)

Returns the value of attribute superseed


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

def superseed
  @superseed
end

#trackersObject (readonly)

Returns the value of attribute trackers


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

def trackers
  @trackers
end

#ulrateObject (readonly)

Returns the value of attribute ulrate


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

def ulrate
  @ulrate
end

#ulslotsObject (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

#dht?Boolean


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

def dht?
  @dht == 1
end

#pex?Boolean


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

def pex?
  @pex == 1
end

#seed_override?Boolean


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

def seed_override?
  @seed_override == 1
end

#superseed?Boolean


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

def superseed?
  @superseed == 1
end