Class: MyLocalPutio::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/my-local-putio/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
# File 'lib/my-local-putio/configuration.rb', line 7

def initialize
  read_args_from_envs!
  parse_args!
  set_defaults!
  validate_args!
end

Instance Attribute Details

#debugObject (readonly)

Returns the value of attribute debug.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def debug
  @debug
end

#delete_remoteObject (readonly)

Returns the value of attribute delete_remote.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def delete_remote
  @delete_remote
end

#detailed_progressObject (readonly)

Returns the value of attribute detailed_progress.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def detailed_progress
  @detailed_progress
end

#disk_thresholdObject (readonly)

Returns the value of attribute disk_threshold.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def disk_threshold
  @disk_threshold
end

#local_destinationObject (readonly)

Returns the value of attribute local_destination.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def local_destination
  @local_destination
end

#silentObject (readonly)

Returns the value of attribute silent.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def silent
  @silent
end

#socks_hostObject (readonly)

Returns the value of attribute socks_host.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def socks_host
  @socks_host
end

#socks_portObject (readonly)

Returns the value of attribute socks_port.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def socks_port
  @socks_port
end

#temp_destinationObject (readonly)

Returns the value of attribute temp_destination.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def temp_destination
  @temp_destination
end

#tokenObject (readonly)

Returns the value of attribute token.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def token
  @token
end

#with_subtitlesObject (readonly)

Returns the value of attribute with_subtitles.



3
4
5
# File 'lib/my-local-putio/configuration.rb', line 3

def with_subtitles
  @with_subtitles
end

Instance Method Details

#disk_managerObject



14
15
16
# File 'lib/my-local-putio/configuration.rb', line 14

def disk_manager
  @disk_manager ||= DiskManager.new(self)
end

#loggerObject



22
23
24
# File 'lib/my-local-putio/configuration.rb', line 22

def logger
  @logger ||= Logger.new(self)
end

#socks_enabled?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/my-local-putio/configuration.rb', line 18

def socks_enabled?
  @socks_host || @socks_port
end