Class: InlineEncryption::CLI
- Inherits:
-
Thor
- Object
- Thor
- InlineEncryption::CLI
- Defined in:
- lib/inline_encryption/cli.rb
Overview
CLI class for using on commandline
Instance Method Summary collapse
- #encrypt(data) ⇒ Object
-
#initialize(args = [], opts = [], config = {}) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(args = [], opts = [], config = {}) ⇒ CLI
Returns a new instance of CLI.
8 9 10 |
# File 'lib/inline_encryption/cli.rb', line 8 def initialize(args = [], opts = [], config = {}) super(args, opts, config) end |
Instance Method Details
#encrypt(data) ⇒ Object
14 15 16 17 18 |
# File 'lib/inline_encryption/cli.rb', line 14 def encrypt(data) load_environment([:require]) if [:require] puts InlineEncryption.encrypt(data) end |