Class: Shellject::Tasks::Load
- Inherits:
-
Object
- Object
- Shellject::Tasks::Load
- Includes:
- CryptoTask
- Defined in:
- lib/shellject/tasks/load.rb
Overview
Loads, decrypts, and outputs a shelljection
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#save_directory ⇒ Object
readonly
Returns the value of attribute save_directory.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(save_directory, name) ⇒ Load
constructor
A new instance of Load.
Methods included from CryptoTask
Constructor Details
#initialize(save_directory, name) ⇒ Load
Returns a new instance of Load.
10 11 12 13 |
# File 'lib/shellject/tasks/load.rb', line 10 def initialize(save_directory, name) @save_directory = save_directory @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/shellject/tasks/load.rb', line 8 def name @name end |
#save_directory ⇒ Object (readonly)
Returns the value of attribute save_directory.
8 9 10 |
# File 'lib/shellject/tasks/load.rb', line 8 def save_directory @save_directory end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/shellject/tasks/load.rb', line 15 def call ensure_readable file = File.open path STDOUT.print crypto.decrypt(file) ensure file&.close end |