Class: MyLocalPutio::Configuration
- Inherits:
-
Object
- Object
- MyLocalPutio::Configuration
- Defined in:
- lib/my-local-putio/configuration.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
readonly
Returns the value of attribute debug.
-
#delete_remote ⇒ Object
readonly
Returns the value of attribute delete_remote.
-
#detailed_progress ⇒ Object
readonly
Returns the value of attribute detailed_progress.
-
#disk_threshold ⇒ Object
readonly
Returns the value of attribute disk_threshold.
-
#local_destination ⇒ Object
readonly
Returns the value of attribute local_destination.
-
#silent ⇒ Object
readonly
Returns the value of attribute silent.
-
#socks_host ⇒ Object
readonly
Returns the value of attribute socks_host.
-
#socks_port ⇒ Object
readonly
Returns the value of attribute socks_port.
-
#temp_destination ⇒ Object
readonly
Returns the value of attribute temp_destination.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#with_subtitles ⇒ Object
readonly
Returns the value of attribute with_subtitles.
Instance Method Summary collapse
- #disk_manager ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #logger ⇒ Object
- #socks_enabled? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
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
#debug ⇒ Object (readonly)
Returns the value of attribute debug.
3 4 5 |
# File 'lib/my-local-putio/configuration.rb', line 3 def debug @debug end |
#delete_remote ⇒ Object (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_progress ⇒ Object (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_threshold ⇒ Object (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_destination ⇒ Object (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 |
#silent ⇒ Object (readonly)
Returns the value of attribute silent.
3 4 5 |
# File 'lib/my-local-putio/configuration.rb', line 3 def silent @silent end |
#socks_host ⇒ Object (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_port ⇒ Object (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_destination ⇒ Object (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 |
#token ⇒ Object (readonly)
Returns the value of attribute token.
3 4 5 |
# File 'lib/my-local-putio/configuration.rb', line 3 def token @token end |
#with_subtitles ⇒ Object (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_manager ⇒ Object
14 15 16 |
# File 'lib/my-local-putio/configuration.rb', line 14 def disk_manager @disk_manager ||= DiskManager.new(self) end |
#logger ⇒ Object
22 23 24 |
# File 'lib/my-local-putio/configuration.rb', line 22 def logger @logger ||= Logger.new(self) end |
#socks_enabled? ⇒ Boolean
18 19 20 |
# File 'lib/my-local-putio/configuration.rb', line 18 def socks_enabled? @socks_host || @socks_port end |