kigster/secrets-cipher-base64

View on GitHub
lib/sym/app/commands/encrypt.rb

Summary

Maintainability
A
15 mins
Test Coverage
require 'sym/app/commands/base_command'
module Sym
  module App
    module Commands
      class Encrypt < BaseCommand
        include Sym

        required_options [ :key, :interactive ],
                         [ :encrypt ],
                         [ :file, :string ]

        try_after :generate_key

        def execute
          send(application.action, content, application.key)
        end
      end
    end
  end
end