Sha256: 8d568706f8830d8d03567b9835e4bf1d4f0cb671813e7963e26364c7028c76b4

Contents?: true

Size: 512 Bytes

Versions: 24

Compression:

Stored size: 512 Bytes

Contents

module Approvals
  module Reporters
    class Reporter

      attr_reader :launcher

      def initialize(&launcher)
        @launcher = launcher || default_launcher
      end

      def report(received, approved)
        launch(received, approved)
      end

      def approved_when_reported?
        false
      end

      def default_launcher
        Launcher.opendiff
      end

      protected

      def launch(received, approved)
        `#{launcher.call(received, approved)}`
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
approvals-0.0.6 lib/approvals/reporters/reporter.rb
approvals-0.0.5 lib/approvals/reporters/reporter.rb
approvals-0.0.4 lib/approvals/reporters/reporter.rb
approvals-0.0.3 lib/approvals/reporters/reporter.rb