Class: Aspera::Cli::Context
- Inherits:
-
Object
- Object
- Aspera::Cli::Context
- Defined in:
- lib/aspera/cli/main.rb
Overview
Global objects shared with plugins
Constant Summary collapse
- MEMBERS =
%i[options transfer config formatter persistency man_header].freeze
Instance Attribute Summary collapse
-
#config ⇒ Plugins::Config
The configuration plugin, used by plugins to get configuration values and presets.
-
#formatter ⇒ Formatter
The formatter, used by plugins to display results and messages.
-
#man_header ⇒ Boolean
Whether to display the manual header in plugin help.
-
#options ⇒ Manager
The command line options manager.
-
#persistency ⇒ Object
# whatever the type is.
-
#transfer ⇒ TransferAgent
The transfer agent, used by transfer plugins.
Instance Method Summary collapse
-
#initialize ⇒ Context
constructor
Initialize all members to nil, so that they are defined and can be validated later.
- #only_manual! ⇒ Object
- #only_manual? ⇒ Boolean
-
#validate ⇒ Object
Validate that all members are set, raise exception if not.
Constructor Details
Instance Attribute Details
#config ⇒ Plugins::Config
Returns the configuration plugin, used by plugins to get configuration values and presets.
34 |
# File 'lib/aspera/cli/main.rb', line 34 MEMBERS = %i[options transfer config formatter persistency man_header].freeze |
#formatter ⇒ Formatter
Returns the formatter, used by plugins to display results and messages.
34 |
# File 'lib/aspera/cli/main.rb', line 34 MEMBERS = %i[options transfer config formatter persistency man_header].freeze |
#man_header ⇒ Boolean
Returns whether to display the manual header in plugin help.
34 |
# File 'lib/aspera/cli/main.rb', line 34 MEMBERS = %i[options transfer config formatter persistency man_header].freeze |
#options ⇒ Manager
Returns the command line options manager.
34 |
# File 'lib/aspera/cli/main.rb', line 34 MEMBERS = %i[options transfer config formatter persistency man_header].freeze |
#persistency ⇒ Object
Returns # whatever the type is.
34 |
# File 'lib/aspera/cli/main.rb', line 34 MEMBERS = %i[options transfer config formatter persistency man_header].freeze |
#transfer ⇒ TransferAgent
Returns the transfer agent, used by transfer plugins.
34 |
# File 'lib/aspera/cli/main.rb', line 34 MEMBERS = %i[options transfer config formatter persistency man_header].freeze |
Instance Method Details
#only_manual! ⇒ Object
54 55 56 |
# File 'lib/aspera/cli/main.rb', line 54 def only_manual! @transfer = :only_manual end |
#only_manual? ⇒ Boolean
50 51 52 |
# File 'lib/aspera/cli/main.rb', line 50 def only_manual? transfer.eql?(:only_manual) end |