Class: InlineEncryption::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/inline_encryption/cli.rb

Overview

CLI class for using on commandline

Instance Method Summary collapse

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(options[:require]) if options[:require]

  puts InlineEncryption.encrypt(data)
end