Class: Flydata::Command::Encrypt
- Defined in:
- lib/flydata/command/encrypt.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#ask_input_table_name, #ask_yes_no, #choose_one, #flydata, #initialize, #newline, #register_crontab, #retrieve_data_entries, #separator
Methods included from Flydata::CommandLoggable
#before_logging, #log_error_stderr, #log_info_stdout, #log_warn_stderr
Constructor Details
This class inherits a constructor from Flydata::Command::Base
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/flydata/command/encrypt.rb', line 7 def run dp = flydata.data_port.get key = dp['key'] text = ask_password encrypted_text = Flydata::Util::Encryptor.encrypt(text, key) puts "Encrypted text: #{encrypted_text}" end |