Class: InlineEncryption::CLI
- Inherits:
-
Thor
- Object
- Thor
- InlineEncryption::CLI
- Defined in:
- lib/inline_encryption/cli.rb
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.
9 10 11 12 13 14 15 |
# File 'lib/inline_encryption/cli.rb', line 9 def initialize(args=[], opts=[], config={}) super(args, opts, config) if [:config] && File.exists?([:config]) = YAML.load_file([:config]).symbolize_keys.merge(.symbolize_keys) end end |
Instance Method Details
#encrypt(data) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/inline_encryption/cli.rb', line 20 def encrypt(data) #puts options load_enviroment([:require]) puts InlineEncryption.encrypt(data) end |