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[ transfer config formatter persistency man_header].freeze
Instance Method Summary collapse
-
#initialize ⇒ Context
constructor
A new instance of Context.
- #only_manual ⇒ Object
- #only_manual? ⇒ Boolean
- #validate ⇒ Object
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
23 24 25 |
# File 'lib/aspera/cli/main.rb', line 23 def initialize @man_header = true end |
Instance Method Details
#only_manual ⇒ Object
38 39 40 |
# File 'lib/aspera/cli/main.rb', line 38 def only_manual @transfer = :only_manual end |
#only_manual? ⇒ Boolean
34 35 36 |
# File 'lib/aspera/cli/main.rb', line 34 def only_manual? transfer.eql?(:only_manual) end |
#validate ⇒ Object
27 28 29 30 31 32 |
# File 'lib/aspera/cli/main.rb', line 27 def validate MEMBERS.each do |i| Aspera.assert(instance_variable_defined?(:"@#{i}")) Aspera.assert(!instance_variable_get(:"@#{i}").nil?) end end |