Sha256: 4eac6c047cbc8c3d1176028818360414e6e136b256417a4cbb6595d3028e9fa3
Contents?: true
Size: 563 Bytes
Versions: 1
Compression:
Stored size: 563 Bytes
Contents
# frozen_string_literal: true require 'thor' module InlineEncryption # CLI class for using on commandline class CLI < Thor def initialize(args = [], opts = [], config = {}) super(args, opts, config) end desc 'encrypt [DATA]', 'encrypt stuff' class_option :require, aliases: ['-r'], type: :string def encrypt(data) load_environment(options[:require]) if options[:require] puts InlineEncryption.encrypt(data) end protected def load_environment(file) require File.expand_path(file) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inline_encryption-2.1.0 | lib/inline_encryption/cli.rb |