Sha256: 00b83d7b2061c931d161f1d73fff0396c3504c3237072281e1622e0044df6876

Contents?: true

Size: 748 Bytes

Versions: 3

Compression:

Stored size: 748 Bytes

Contents

module LicenseFinder
  module CLI
    module MakesDecisions
      def self.included(mod)
        mod.extend(ClassMethods)
      end

      module ClassMethods
        def auditable
          method_option :who, desc: 'The person making this decision'
          method_option :why, desc: 'The reason for making this decision'
          method_option :version, desc: 'The version that will be approved'
        end
      end

      private

      def txn
        @txn ||= {
          who: options[:who],
          why: options[:why],
          versions: options[:version] ? [options[:version]] : [],
          when: Time.now.getutc
        }
      end

      def modifying(&block)
        license_finder.modifying(&block)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
license_finder-4.0.2 lib/license_finder/cli/makes_decisions.rb
license_finder-4.0.1 lib/license_finder/cli/makes_decisions.rb
license_finder-3.1.1 lib/license_finder/cli/makes_decisions.rb