Sha256: a96663f2262e1d35eb7c26dfda332d90c3bc18ca6154696ca1a3a60b291b756b

Contents?: true

Size: 329 Bytes

Versions: 3

Compression:

Stored size: 329 Bytes

Contents

module Shhh
  module App
    class Args < Struct.new(:opts)
      MODE = %i(encrypt decrypt generate edit keychain)
      KEY  = %i(private_key interactive keyfile keychain)

      def mode?; is MODE; end
      def key?; is KEY; end

      private
      def is(list)
        list.any?{ |o| opts[o] }
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shhh-1.4.1 lib/shhh/app/args.rb
shhh-1.4.0 lib/shhh/app/args.rb
shhh-1.3.0 lib/shhh/app/args.rb