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.
8 9 10 11 |
# File 'lib/shellject/tasks/load.rb', line 8 def initialize(save_directory, name) @save_directory = save_directory @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/shellject/tasks/load.rb', line 6 def name @name end |
#save_directory ⇒ Object (readonly)
Returns the value of attribute save_directory.
6 7 8 |
# File 'lib/shellject/tasks/load.rb', line 6 def save_directory @save_directory end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/shellject/tasks/load.rb', line 13 def call ensure_readable file = File.open path STDOUT.print crypto.decrypt(file) ensure file.close if file end |